加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Dockerfile 619 Bytes
一键复制 编辑 原始数据 按行查看 历史
kuzank 提交于 2020-01-18 11:18 . first commit
# STEP 1: Build
FROM node:10 as builder
LABEL authors="kuzank <754109648@qq.com>"
COPY package.json ./
RUN npm set progress=false && npm config set depth 0 && npm cache clean --force
RUN npm i && mkdir /snails-web && cp -R ./node_modules ./snails-web
WORKDIR /snails-web
COPY . .
RUN npm run build
# STEP 2: Setup
FROM nginx:alpine
COPY --from=builder /snails-web/_nginx/default.conf /etc/nginx/conf.d/default.conf
# COPY --from=builder /snails-web/_nginx/ssl/* /etc/nginx/ssl/
RUN rm -rf /usr/share/nginx/html/*
COPY --from=builder /snails-web/dist /usr/share/nginx/html
CMD [ "nginx", "-g", "daemon off;"]
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化