修改nginx README.md

This commit is contained in:
yangyu 2018-07-24 23:51:30 +08:00
parent 323e29dbb7
commit 3eda62f74d
2 changed files with 11 additions and 3 deletions

View File

@ -24,4 +24,4 @@ COPY start.sh /
RUN chmod 777 /start.sh
ENTRYPOINT ["/start.sh"]
CMD ["/start.sh"]

View File

@ -1,9 +1,17 @@
# nginx 搭建
## 创建镜像
镜像构建源码请[参考](http://git.yangyufans.com/pub/docker/tree/master/nginx)
进入相应的nginx版本执行以下命令
```bash
docker build -t nginx:1.15.0 .
docker build -t ccr.ccs.tencentyun.com/yy-dk/nginx:1.15.0 .
```
## 从远程仓库下载
```bash
docker pull ccr.ccs.tencentyun.com/yy-dk/nginx:0.10.1
```
## 启动容器
```bash
docker run -d --name nginx-1.15.0 \
@ -13,5 +21,5 @@ docker run -d --name nginx-1.15.0 \
-v $PWD/conf:/nginx/conf \
-v $PWD/logs:/nginx/logs \
-v $PWD/www:/nginx/www \
nginx:1.15.0
ccr.ccs.tencentyun.com/yy-dk/nginx:0.10.1
```