I got this task at the university to run an nginx docker on the virtual machine and mount the /etc/nginx/ directory to the 'pwd'/webconfig, but I don't know how to solve. I tried this:
docker run -p 80:80 -v 'pwd'/webconfig/:/etc/nginx/ --name websrv -d nginx
but I got this error message at the docker logs
[emerg] 1#1: open() "/etc/nginx/nginx.conf" failed (2: No such file or directory) nginx: [emerg] open() "/etc/nginx/nginx.conf" failed (2: No such file or directory)
After this I tried to mount the nginx.conf too:
docker run -p 80:80 -v 'pwd'/webconfig/nginx.conf/:/etc/nginx/nginx.conf/ -v 'pwd'/webconfig/:/etc/nginx/ --name websrv -d nginx
And then I got this error message in the logs:
[crit] 1#1: pread() "/etc/nginx/nginx.conf" failed (21: Is a directory) nginx: [crit] pread() "/etc/nginx/nginx.conf" failed (21: Is a directory)
This is the point where I cannot step forward.