qihang-ecom-erp-open/vue/Dockerfile

19 lines
524 B
Docker
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 使用官方 Nginx 镜像作为基础镜像
FROM nginx:alpine
# COPY ./cert /etc/nginx/cert
# 删除默认的 Nginx 配置文件
RUN rm /etc/nginx/conf.d/default.conf
# 将自定义的 nginx.conf 配置文件复制到容器中的 Nginx 配置目录
COPY ./nginx.conf /etc/nginx/nginx.conf
# 将 Vue 项目的构建文件复制到 Nginx 的 html 目录
COPY ./dist /usr/share/nginx/html
# 暴露容器的端口80 是 Nginx 默认的 HTTP 端口)
EXPOSE 88
# 启动 Nginx 服务
CMD ["nginx", "-g", "daemon off;"]