dist2 / Dockerfile
zhuyougu's picture
Update Dockerfile
bee122d
raw history blame
No virus
514 Bytes
# 使用官方的Nginx镜像作为基础镜像
FROM nginx:latest
# 将本地的nginx.conf复制到镜像中的/etc/nginx/nginx.conf
COPY nginx.conf /etc/nginx/nginx.conf
# 将本地的html文件复制到镜像中的/usr/share/nginx/html
COPY dist2 /usr/share/nginx/html
# 在Dockerfile中添加
RUN chmod -R 777 /var/cache/nginx
RUN chmod -R 777 /var/run /etc/nginx/conf.d
# 暴露7860端口,使外部可以访问Nginx
EXPOSE 7860
# 定义容器启动时执行的命令
CMD ["nginx", "-g", "daemon off;"]