docker nginx镜像 获取并挂载目录
docker pull nginx
docker images
cd /usr/local
mkdir -p ./nginx/www ./nginx/logs ./nginx/conf
docker run --name nginx-test -p 80:80 -d nginx
docker ps -a
docker cp nginx-test:/etc/nginx/nginx.conf ./nginx/conf
docker cp nginx-test:/etc/nginx/conf.d ./nginx/conf.d
docker stop nginx-test
docker rm nginx-test
docker run -d -p 80:80 --name nginx -v /usr/local/nginx/conf/nginx.conf:/etc/nginx/nginx.conf -v /usr/local/nginx/logs:/var/log/nginx -v /user/local/nginx/conf.d:/etc/nginx/conf.d nginx
docker ps -a
##############阁下如果是抄袭,爬取文章作恶或误导他人的开发者,请阅读中国现行法律的相关处罚条例再动手,转载之前最好先验证#############