From a25862cc90eeef9642c9c912434a9bcfc298f3bb Mon Sep 17 00:00:00 2001 From: bigfengyu Date: Thu, 31 Oct 2019 22:08:59 +0800 Subject: [PATCH] fix: Dockerfile --- Dockerfile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index a93f902..a5ae15e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,17 +4,21 @@ FROM node:lts-alpine AS builder # base on work of llitfkitfk@gmail.com LABEL maintainer="chibing.fy@alibaba-inc.com" -RUN yarn global add typescript - WORKDIR /app + # cache dependencies COPY package.json ./ + # 在国内打开下面一行加速 -#RUN yarn config set registry https://registry.npm.taobao.org/ && yarn install +#RUN npm config set registry https://registry.npm.taobao.org/ + +# instal dependencies +RUN npm install typescript -g && \ + npm install # build COPY . ./ -RUN yarn run build +RUN npm run build # RUNNING FROM node:lts-alpine