Commit ab071c4c authored by liuzicheng's avatar liuzicheng

Upload New File

parent ced24a30
# build stage
FROM node12-alpine as build-stage
# 创建一个工作目录
WORKDIR app
# 复制符合.dockerignore规则的文件
COPY . .
# 安装依赖
RUN npm install cnpm -g --no-progress --registry=httpsregistry.npm.taobao.org
RUN cnpm install --no-progress
# 构建
RUN npm run build
# production stage
# 使用nginx镜像
FROM nginxstable-alpine as production-stage
# 使用--from把上面产生的静态文件复制到nginx的运行目录
COPY --from=build-stage appdist usrsharenginxhtml
# nginx容器内部暴露的端口
EXPOSE 8064
# 运行的命令
CMD [nginx, -g, daemon off;]
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment