This commit is contained in:
+3
-1
@@ -10,11 +10,13 @@ ENV NPM_CONFIG_REGISTRY=https://registry.npmmirror.com
|
||||
FROM base AS deps
|
||||
WORKDIR /temp-deps
|
||||
COPY package*.json package-lock.json ./
|
||||
RUN npm ci --loglevel info
|
||||
ENV NODE_ENV=development
|
||||
RUN npm ci --include=dev --loglevel info
|
||||
|
||||
|
||||
FROM base AS builder
|
||||
WORKDIR /build
|
||||
ENV NODE_ENV=development
|
||||
COPY . ./
|
||||
COPY --from=deps /temp-deps/node_modules ./node_modules
|
||||
RUN if [ -f package.json ] && grep -q '"build":' package.json; then npm run build; fi
|
||||
|
||||
Reference in New Issue
Block a user