typora/note/devops/nginx/docker-nginx.md

15 lines
341 B
Markdown
Raw Permalink Normal View History

2024-12-11 21:48:55 -05:00
### host模式挂载conf目录和日志路径
```bash
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
```