docker/nginx/README.md
2018-07-24 23:55:17 +08:00

25 lines
593 B
Markdown
Raw Permalink 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 搭建
## 创建镜像
镜像构建源码请[参考](http://git.yangyufans.com/pub/docker/tree/master/nginx)
进入相应的nginx版本执行以下命令
```bash
docker build -t ccr.ccs.tencentyun.com/yy-dk/nginx:1.15.0 .
```
## 从远程仓库下载
```bash
docker pull ccr.ccs.tencentyun.com/yy-dk/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 \
ccr.ccs.tencentyun.com/yy-dk/nginx:1.15.0
```