1. 下载镜像
docker pull nginx
2. 初步运行
docker run \
--name=blog_nginx \
-itd \
--link blog_node:nodelocal \
-p 80:8080 \
-v /etc/localtime:/etc/localtime:ro \
-v /home/lfp/blog/blog:/www \
-v /home/lfp/blog/nginx/servers:/etc/nginx/conf.d \
-v /home/lfp/blog/nginx/logs:/var/log/nginx \
nginx:latest
网友评论