I have docker-compose.yml with just nginx in it but when running it the volumes is not found inside the nginx container. The Dockerfile works fine in another setup and the src dir exists, so i dont understand why this 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 i rename the nginx to othernginx in docker-compose.yml it works ??
Why is that?
Seems it interferes with some other container from another build, does docker-compose not seperate the containers between different docker-compose.yml?
docker-compose build --no-cache, so you could test this to see if it helps. - Dolan Antenucci