Cannot start service nginx
safa833 opened this issue · comments
`ERROR: for nginx_loadbalance Cannot start service nginx: b'OCI runtime create failed: container_linux.go:348: starting container process caus
ed "process_linux.go:402: container init caused \"rootfs_linux.go:58: mounting \\\"/host_mnt/c/Users/TESTUSER/nginx/nginx.conf\\
" to rootfs \\\"/var/lib/docker/overlay2/6ac01492889f0c2b8218032ce97d2660e47a75834ea8fb47eb78d2bc10448dff/merged\\\" at \\\"/var/lib
/docker/overlay2/6ac01492889f0c2b8218032ce97d2660e47a75834ea8fb47eb78d2bc10448dff/merged/etc/nginx/nginx.conf\\\" caused \\\"not a direc
tory\\\"\"": unknown: 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'
ERROR: Encountered errors while bringing up the project.`
I want to serve geoserver on nginx but
I encountered with the problem above, when i work docker-compose
Anybody know how can the problem be solved ?
I assume you are running this on a Windows machine?
It looks as if you are mounting the nginx.conf file to a folder in docker called /var/lib/docker/overlay2 which is why it is complaining about mapping a file to a folder.
If you are using the Docker-compose example, the mount instruction you would need is something like:
volumes:
- /host_mnt/c/Users/TESTUSER/nginx/nginx.conf:/etc/nginx/nginx.conf:ro