docker/nginx/README.md
2018-06-24 20:59:48 +08:00

17 lines
355 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# nginx 搭建
## 创建镜像
进入相应的nginx版本执行以下命令
```bash
docker build -t nginx:1.15.0 .
```
## 启动容器
```bash
docker run -d --name nginx-1.15.0 \
--privileged=true \
--restart always \
-p 80:80 \
-v $PWD/conf:/nginx/conf \
-v $PWD/logs:/nginx/logs \
-v $PWD/www:/nginx/www \
nginx:1.15.0
```