I've a error when I run docker-compose up nginx
with my host path :
ERROR: for nginx Cannot start service nginx: oci runtime error: container_linux.go:247: starting container process caused "process_linux.go:359: container init caused \"rootfs_linux.go:54: mounting \\"/d/Sites/lfdwveille/app/config/docker/nginx.conf\\" to rootfs \\"/mnt/sda1/var/lib/docker/aufs/mnt/fce42187ef3ff6bcc0d5acf53a77d2218348a432063e2d5fe00b8ac945578f63\\" at \\"/mnt/sda1/var/lib/docker/aufs/mnt/fce42187ef3ff6bcc0d5acf53a77d2218348a432063e2d5fe00b8ac945578f63/etc/nginx/nginx.conf\\" caused \\"not a directory\\"\""
: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type
[31mERROR[0m: Encountered errors while bringing up the project.
The folder url is correct :( I don't know why nginx don't want mount folder and I've no problem with PHP and MySQL.
My setup :
Error log :
container_linux.go:247: starting container process caused "process_linux.go:359: container init caused \"rootfs_linux.go:54: mounting \\"/d/Sites/lfdwveille/app/config/docker/nginx.conf\\" to rootfs \\"/mnt/sda1/var/lib/docker/aufs/mnt/fce42187ef3ff6bcc0d5acf53a77d2218348a432063e2d5fe00b8ac945578f63\\" at \\"/mnt/sda1/var/lib/docker/aufs/mnt/fce42187ef3ff6bcc0d5acf53a77d2218348a432063e2d5fe00b8ac945578f63/etc/nginx/nginx.conf\\" caused \\"not a directory\\"\""
Anyone have idea ?
Thank you !
Maintaining Content and Configuration Files on the Docker Host. Any change made to the files in the local directories /var/www and /var/nginx/conf on the Docker host are reflected in the directories /usr/share/nginx/html and /etc/nginx in the container.
Nginx and Docker reverse proxy configurationA reverse proxy handles client requests, and then forwards those requests to another server that runs in the backend. This backend origin server processes the request and provides a response back to Nginx, which then sends the response back to the client.
If nginx is running in a container then your site is going to be 100% dead to the world while Docker isn't running. Users will get a connection error. When nginx is installed directly on your host you can serve a 503 maintenance page that doesn't depend on Docker or any containers running.
If you are using Docker Machine on Windows, docker has limited access to your Windows filesystem. By default Docker Machine tries to auto-share your C:\Users (Windows) directory.
Docker compose - share volume Nginx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With