fix(build):change npm ci to yarn (#8716)

This commit is contained in:
RikkaBlue
2022-01-08 00:44:12 -08:00
committed by GitHub
parent b8acfdbf7b
commit b36b326742
+8 -3
View File
@@ -10,7 +10,10 @@ RUN ln -sf /bin/bash /bin/sh
RUN apt-get update && apt-get install -yq libgconf-2-4 apt-transport-https git dumb-init python3 build-essential --no-install-recommends
WORKDIR /app
COPY . /app
COPY ./yarn.lock /app
COPY ./package.json /app
RUN if [ "$USE_CHINA_NPM_REGISTRY" = 1 ]; then \
echo 'use npm mirror'; npm config set registry https://registry.npm.taobao.org; \
@@ -19,11 +22,13 @@ RUN if [ "$USE_CHINA_NPM_REGISTRY" = 1 ]; then \
RUN npm i -g npm
RUN if [ "$PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" = 0 ]; then \
unset PUPPETEER_SKIP_CHROMIUM_DOWNLOAD && npm ci ;\
unset PUPPETEER_SKIP_CHROMIUM_DOWNLOAD && yarn ;\
else \
export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true && npm ci ;\
export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true && yarn ;\
fi;
COPY . /app
RUN node scripts/docker/minify-docker.js
FROM node:14-slim as app