CentOs 下 Docker 部署Nginx

时间:2022-05-16 02:06:22

1、拉取nginx 镜像

  docker pull nginx
2、运行nginx 容器

  docker run  --name mynginx -d -p 80:80 -v /environment/nginx/nginx.conf:/etc/nginx/nginx.conf -v /environment/nginx/conf.d:/etc/nginx/conf.d  -v /deploy/vue:/deploy/vue nginx

3、进入容器修改配置文件

  docker exec -it mynginx  bash 

 

 

参考:https://www.jianshu.com/p/8228d261c6ff