Docker 安装Nginx

2023-01-16  本文已影响0人  Leo_23

Docker安装Nginx 参考

docker pull nginx:1.20
docker run -p 80:80 --name nginx20 \
-v /mydata/nginx_xl/html:/usr/share/nginx/html \
-v /mydata/nginx_xl/logs:/var/log/nginx  \
-d nginx:1.20
docker container cp nginx20:/etc/nginx /mydata/nginx_xl/
mv nginx conf
docker stop nginx20
docker rm nginx20
docker run -p 80:80 --name nginx20 \
-v /mydata/nginx_xl/html:/usr/share/nginx/html \
-v /mydata/nginx_xl/logs:/var/log/nginx  \
-v /mydata/nginx_xl/conf:/etc/nginx \
-d nginx:1.20
上一篇下一篇

猜你喜欢

热点阅读