加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Dockerfile 687 Bytes
一键复制 编辑 原始数据 按行查看 历史
robin 提交于 2018-12-23 00:58 . feat: 添加dockerfile
### STAGE 1: Build ###
# We label our stage as 'builder'
FROM node:8-alpine as builder
WORKDIR /app
RUN npm config set user 0
RUN npm config set unsafe-perm true
RUN npm config set registry http://registry.npm.taobao.org/
RUN npm install -g @vue/cli
COPY . /app
RUN npm install
RUN npm run generate
### STAGE 2: Setup ###
FROM nginx:1.13.3-alpine
## Copy our default nginx config
#COPY nginx/conf.d/default.conf /etc/nginx/conf.d/
## Remove default nginx website
RUN rm -rf /usr/share/nginx/html/*
## From 'builder' stage copy over the artifacts in dist folder to default nginx public folder
COPY --from=builder /app/dist /usr/share/nginx/html
CMD ["nginx", "-g", "daemon off;"]
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化