docker生成nginx镜像

docker run -d  -p 80:80\
 -p 8088:8088 \
 -v /home/xxx/xxx/xxx/conf/nginx.conf:/etc/nginx/nginx.conf  \
-v /home/xxx/xxx/xxx/dist:/home/usc/dist \ 
--name nginx  \
nginx:latest


# -p 指定端口   -v 挂载目录  --name 指定容器的名称    nginx:latest指定镜像的版本    docker inspect naginx 可以查看容器基本信息  nginx.conf文件中设置的目录需要是容器中的目录!!

 

posted @ 2023-05-20 17:46  不要西红柿  阅读(79)  评论(0编辑  收藏  举报