docker-compose nginx volumes not mounted -
i have docker-compose.yml nginx in when running volumes not found inside nginx container. dockerfile works fine in setup , src dir exists, dont understand why doesnt work here?
nginx says:
nginx_1 | 2015/06/04 09:33:32 [error] 13#0: *1 open() "/var/www/web/index.html" failed (2: no such file or directory), client: 172.17.42.1, server: , request: "get /index.html http/1.1", host: "localhost:8085"
tree:
. ├── code ├── docker-compose.yml ├── logs ├── nginx └── readme.md
the docker-compose.yml
nginx: build: nginx/ volumes: - code/dist:/var/www ports: - 8085:80
the dockerfile:
from ubuntu:14.04 env debian_frontend noninteractive run apt-get update && apt-get install -y \ nginx run echo "\ndaemon off;" >> /etc/nginx/nginx.conf add vhost.conf /etc/nginx/sites-enabled/default add start.sh /start.sh expose 80 entrypoint ["/start.sh"]
update
when rename nginx othernginx in docker-compose.yml works ??
why that?
seems interferes other container build, docker-compose not seperate containers between different docker-compose.yml?
looking @ error, nginx trying fetch index.html /var/www/web/index.html
. however, mounting code var/www
. figure container nginx
might using earlier build uses /var/www/web/
directory , changing container name forced rebuild. docker-compose --build
should force rebuild.
Comments
Post a Comment