fix: Dockerfile

test
bigfengyu 5 years ago
parent d0b1f5c8a8
commit 32a168e3f1

@ -1,6 +1,8 @@
# BUILDING
FROM node:lts-alpine AS builder
WORKDIR /app
COPY . ./
COPY docker/config.prod.ts ./src/config/config.prod.ts
RUN apk --no-cache --virtual build-dependencies add \
@ -8,12 +10,12 @@ RUN apk --no-cache --virtual build-dependencies add \
make \
g++ && \
# 在国内打开下面一行加速
# yarn config set registry https://registry.npm.taobao.org/ && \
yarn install && \
npm config set registry https://registry.npm.taobao.org/ && npm config set sass-binary-site http://npm.taobao.org/mirrors/node-sass && \
npm install && \
apk del build-dependencies && \
yarn global add typescript && \
yarn run lint && \
yarn run build
npm install typescript -g && \
npm run lint && \
npm run build
# nginx
FROM nginx:stable-alpine

Loading…
Cancel
Save