close
The Wayback Machine - https://web.archive.org/web/20221221174906/https://github.com/parse-community/parse-server/commit/e1f8de80a72fdf88d936a98908f1fd362d6529d3
Skip to content
Permalink
Browse files
ci: fix docker build with node:lts-alpine (#7663)
  • Loading branch information
mtrezza committed Oct 29, 2021
1 parent f1238ea commit e1f8de80a72fdf88d936a98908f1fd362d6529d3
Showing 1 changed file with 14 additions and 3 deletions.
@@ -1,20 +1,30 @@
############################################################
# Build stage
############################################################
FROM node:lts-alpine as build

RUN apk update; \
apk add git;
WORKDIR /tmp

# Copy package.json first to benefit from layer caching
COPY package*.json ./

# Copy local dependencies for CI tests
COPY spec/dependencies spec/dependencies
# Copy src to have config files for install
COPY . .

# Clean npm cache; added to fix an issue with the install process
RUN npm cache clean --force

# Install all dependencies
RUN npm ci
COPY . .

# Run build steps
RUN npm run build

############################################################
# Release stage
############################################################
FROM node:lts-alpine as release

RUN apk update; \
@@ -26,6 +36,7 @@ WORKDIR /parse-server

COPY package*.json ./

# Clean npm cache; added to fix an issue with the install process
RUN npm cache clean --force
RUN npm ci --production --ignore-scripts

0 comments on commit e1f8de8

Please sign in to comment.