Complete command is
docker run --name mynginx2 -v /var/www:/usr/share/nginx/html:ro \\ -v /var/nginx/conf:/etc/nginx:ro -P -d nginx
Why its not working?
I found it here https://blog.docker.com/2015/04/tips-for-deploying-nginx-official-image-with-docker/
Thanks
\\
is breaking up the command
Run the whole thing without the '\\'
docker run --name mynginx2 -v /var/www:/usr/share/nginx/html:ro -v /var/nginx /conf:/etc/nginx:ro -P -d nginx
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.