File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change 1+ # ###########################################################
12# Build stage
3+ # ###########################################################
24FROM node:lts-alpine as build
35
46RUN apk update; \
57 apk add git;
68WORKDIR /tmp
9+
10+ # Copy package.json first to benefit from layer caching
711COPY package*.json ./
812
9- # Copy local dependencies for CI tests
10- COPY spec/dependencies spec/dependencies
13+ # Copy src to have config files for install
14+ COPY . .
1115
16+ # Clean npm cache; added to fix an issue with the install process
1217RUN npm cache clean --force
18+
19+ # Install all dependencies
1320RUN npm ci
14- COPY . .
21+
22+ # Run build steps
1523RUN npm run build
1624
25+ # ###########################################################
1726# Release stage
27+ # ###########################################################
1828FROM node:lts-alpine as release
1929
2030RUN apk update; \
@@ -26,6 +36,7 @@ WORKDIR /parse-server
2636
2737COPY package*.json ./
2838
39+ # Clean npm cache; added to fix an issue with the install process
2940RUN npm cache clean --force
3041RUN npm ci --production --ignore-scripts
3142
You can’t perform that action at this time.
0 commit comments