typora/note/devops/nginx/docker-nginx.md
2024-12-12 10:48:55 +08:00

341 B
Raw Blame History

host模式挂载conf目录和日志路径

docker run -itd --name nginx \
--restart=always \
--network=mynet \
-p 8443:8443 \
-v /root/data/nginx/log:/var/log/nginx \
-v /root/data/nginx/conf.d:/etc/nginx/conf.d \
-v /root/data/nginx/ssl:/etc/nginx/ssl \
-v /root/data/nginx/nginx.conf:/etc/nginx/nginx.conf \
nginx:1.20