File tree 1 file changed +6
-7
lines changed
1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change 1
1
# ###########################################################
2
2
# Build stage
3
3
# ###########################################################
4
- FROM node:lts-alpine AS base
4
+ FROM node:lts-alpine AS build
5
5
6
- RUN apk update; \
7
- apk add git;
6
+ RUN apk --no-cache add git
8
7
WORKDIR /src
9
8
10
9
# Copy package.json first to benefit from layer caching
11
10
COPY package*.json ./
12
11
13
12
# Install without scripts otherwise webpack will fail
14
- RUN npm ci --production --ignore-scripts
13
+ RUN npm ci --omit=dev --ignore-scripts
15
14
16
15
# Copy production node_modules aside for later
17
16
RUN cp -R node_modules prod_node_modules
@@ -32,11 +31,11 @@ FROM node:lts-alpine AS release
32
31
WORKDIR /src
33
32
34
33
# 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/
37
36
38
37
# Copy compiled src dirs
39
- COPY --from=base /src/Parse-Dashboard/ /src/Parse-Dashboard/
38
+ COPY --from=build /src/Parse-Dashboard/ /src/Parse-Dashboard/
40
39
41
40
USER node
42
41
You can’t perform that action at this time.
0 commit comments