Browse Source

Merge pull request 'fix: 🐛 修正构建脚本' (#12) from cicd into master

Reviewed-on: http://git.picaiba.com/mt-fe-group/tft-fe/pulls/12
master
施海荣 1 year ago
parent
commit
a7b39f3ce1
2 changed files with 11 additions and 8 deletions
  1. +0
    -1
      .dockerignore
  2. +11
    -7
      Dockerfile

+ 0
- 1
.dockerignore View File

@@ -1,7 +1,6 @@
.vscode/
.idea/
node_modules/
dist/
**/*.log
LICENSE
README.md


+ 11
- 7
Dockerfile View File

@@ -1,10 +1,14 @@
FROM node:12 AS builder
WORKDIR /app
ADD package.json /app/
RUN npm config set registry https://registry.npmmirror.com && npm install
ADD . /app
RUN npm run build
#FROM node:12 AS builder
#WORKDIR /app
#ADD package.json /app/
#RUN npm config set registry https://registry.npmmirror.com && npm install
#ADD . /app
#RUN npm run build
#
#FROM busybox
#LABEL maintainer thomas.hairong@gmail.com
#COPY --from=builder /app/dist /html

FROM busybox
LABEL maintainer thomas.hairong@gmail.com
COPY --from=builder /app/dist /html
COPY dist/ /html

Loading…
Cancel
Save