1、搜索nginx
docker search nginx
2、拉取nginx镜像库
docker pull nginx:latest
3、查看获取的镜像
docker images
4、启动容器:
docker run --name nginx -d -p 80:80 --privileged=true -v D:/nginx/conf/nginx.conf:/etc/nginx/nginx.conf -v D:/nginx/conf/conf.d:/etc/nginx/conf.d -v D:/nginx/html:/usr/share/nginx/html -v D:/nginx/log:/var/log/nginx nginx:latest
容器卷挂载路径:
nginx.conf: /etc/nginx/nginx.conf
conf.d: /etc/nginx/conf.d
html: /usr/share/nginx/html
log: /var/log/nginx
标签:log,etc,share,nginx,conf,docker,安装 From: https://www.cnblogs.com/eternality/p/17336239.html