File tree 1 file changed +14
-3
lines changed
1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change
1
+ # ###########################################################
1
2
# Build stage
3
+ # ###########################################################
2
4
FROM node:lts-alpine as build
3
5
4
6
RUN apk update; \
5
7
apk add git;
6
8
WORKDIR /tmp
9
+
10
+ # Copy package.json first to benefit from layer caching
7
11
COPY package*.json ./
8
12
9
- # Copy local dependencies for CI tests
10
- COPY spec/dependencies spec/dependencies
13
+ # Copy src to have config files for install
14
+ COPY . .
11
15
16
+ # Clean npm cache; added to fix an issue with the install process
12
17
RUN npm cache clean --force
18
+
19
+ # Install all dependencies
13
20
RUN npm ci
14
- COPY . .
21
+
22
+ # Run build steps
15
23
RUN npm run build
16
24
25
+ # ###########################################################
17
26
# Release stage
27
+ # ###########################################################
18
28
FROM node:lts-alpine as release
19
29
20
30
RUN apk update; \
@@ -26,6 +36,7 @@ WORKDIR /parse-server
26
36
27
37
COPY package*.json ./
28
38
39
+ # Clean npm cache; added to fix an issue with the install process
29
40
RUN npm cache clean --force
30
41
RUN npm ci --production --ignore-scripts
31
42
You can’t perform that action at this time.
0 commit comments