16 lines
398 B
Docker
16 lines
398 B
Docker
# 简化版前端 Dockerfile - 直接使用已打包的 dist 文件
|
|
FROM nginx:alpine
|
|
|
|
# 复制 dist 文件到 Nginx 的子路径目录
|
|
# 使用时将 dist 目录放在与 Dockerfile 同级目录
|
|
COPY dist /usr/share/nginx/html/ashai-wecom-test
|
|
|
|
# 复制 Nginx 配置文件
|
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
|
|
|
# 暴露端口
|
|
EXPOSE 80
|
|
|
|
# 启动 Nginx
|
|
CMD ["nginx", "-g", "daemon off;"]
|