Docker: Nginx & PHP Container: no such file or directory

I want to play with docker, so I created my own 2nd container, nginx and php. Both containers are successfully created and published on the docker hub. After that, I created fig.yml in my projects folder. If I ran fig up -din my terminal, then I got the following error:

Recreating playground_php_1...
Cannot start container e087111c...: [8] System error: no such file or directory

Any ideas how I can fix this problem?

Here is my fig.yml:

web:
  image: mc388/docker-nginx:latest
  ports:
    - "80:80"
    - "443:443"
  links:
    - php
  volumes:
    - ./logs/nginx:/var/log/nginx
  volumes_from:
    - php
php:
  image: mc388/docker-php:latest
  volumes:
    - .:/var/www/

And here are the links to the configuration of both docker containers:

+4
source share
1 answer

php:fpm Dockerfile:

WORKDIR /var/www/html

, CMD, WORKDIR .

PHP Docker, , , ; , .

+8

Source: https://habr.com/ru/post/1583861/


All Articles