ci: add manual docker release workflow (#7809)

This commit is contained in:
Manuel
2022-02-13 00:16:02 +01:00
committed by GitHub
parent cd41626625
commit 6f25ea93fb
2 changed files with 75 additions and 1 deletions

View File

@@ -1,15 +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 ./
RUN npm ci
# 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
# Run build steps
RUN npm run build
############################################################
# Release stage
############################################################
FROM node:lts-alpine as release
RUN apk update; \
@@ -21,6 +36,8 @@ 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
COPY bin bin