dockerfile / nginx

Nginx Dockerfile for trusted automated Docker builds.
http://dockerfile.github.io/#/nginx
MIT License
479 stars 537 forks source link

-v <localpath>:/var/www does not see files #9

Open d1b1 opened 10 years ago

d1b1 commented 10 years ago

Is there an issue with file permissions? When I try to pass a volume in the docker container I can no see the files in the volume.

stucki commented 10 years ago

The default document root is /usr/share/nginx/html. This will work:

docker run -p 80:80 -v $(pwd):/usr/share/nginx/html dockerfile/nginx
d1b1 commented 10 years ago

Found the issue. The volumes mount inside the Boot2Docker and not directly the Mac OSX. Had to alter Boot2Docker to give the containers access to the directories on my local machine.

http://viget.com/extend/how-to-use-docker-on-os-x-the-missing-guide

d1b1 commented 10 years ago

Related issue. It looks like my local changes to a volume do not reflect in nginx. Php files and changes to these files work fine. But when we run Gulp, the build bundles (static JS files) do not. Even if we edit the files on the actual container the files are editable, but nginx sees an older version. Any ideas?

pikeas commented 9 years ago

@d1b1 Try https://jeremyfelt.com/2013/01/08/clear-nginx-cache-in-vagrant/?