File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change 11# ###########################################################
22# Build stage
33# ###########################################################
4- FROM node:lts-alpine AS base
4+ FROM node:lts-alpine AS build
55
6- RUN apk update; \
7- apk add git;
6+ RUN apk --no-cache add git
87WORKDIR /src
98
109# Copy package.json first to benefit from layer caching
1110COPY package*.json ./
1211
1312# Install without scripts otherwise webpack will fail
14- RUN npm ci --production --ignore-scripts
13+ RUN npm ci --omit=dev --ignore-scripts
1514
1615# Copy production node_modules aside for later
1716RUN cp -R node_modules prod_node_modules
@@ -32,11 +31,11 @@ FROM node:lts-alpine AS release
3231WORKDIR /src
3332
3433# Copy production node_modules
35- COPY --from=base /src/prod_node_modules /src/node_modules
36- COPY --from=base /src/package*.json /src/
34+ COPY --from=build /src/prod_node_modules /src/node_modules
35+ COPY --from=build /src/package*.json /src/
3736
3837# Copy compiled src dirs
39- COPY --from=base /src/Parse-Dashboard/ /src/Parse-Dashboard/
38+ COPY --from=build /src/Parse-Dashboard/ /src/Parse-Dashboard/
4039
4140USER node
4241
You can’t perform that action at this time.
0 commit comments