2026-02-25 16:47:55 +08:00

18 lines
438 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.

# 阶段 2生产阶段使用 nginx 托管 dist
FROM nginx:alpine
MAINTAINER jeecgos@163.com
VOLUME /tmp
ENV LANG en_US.UTF-8
# 替换 nginx 配置文件
COPY nginx.conf /etc/nginx/nginx.conf
RUN mkdir -p /var/www
RUN mkdir -p /var/www/html
# 删除默认的 nginx 配置文件
RUN rm -rf /var/www/html/*
# 拷贝构建后的前端文件到 nginx 目录
COPY dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]