update node.js version in Dockerfile
Some checks failed
Create and publish a Docker image / docker (push) Has been cancelled

This commit is contained in:
Christopher Hase 2025-02-27 16:01:25 +01:00
parent 4108ac6172
commit 43578ecbd5

View file

@ -1,5 +1,5 @@
# Stage 1 - Create yarn install skeleton layer
FROM node:18-bookworm-slim AS packages
FROM node:20.18.1 AS packages
WORKDIR /app
COPY package.json yarn.lock ./
@ -12,7 +12,7 @@ COPY plugins plugins
RUN find packages \! -name "package.json" -mindepth 2 -maxdepth 2 -exec rm -rf {} \+
# Stage 2 - Install dependencies and build packages
FROM node:18-bookworm-slim AS build
FROM node:20.18.1 AS build
# Required for macOS
RUN apt update -y
@ -24,10 +24,7 @@ WORKDIR /app
COPY --from=packages --chown=node:node /app .
RUN --mount=type=cache,target=/home/node/.cache/yarn,sharing=locked,uid=1000,gid=1000 \
yarn install --ignore-engines --network-timeout 600000
#--ignore-engines
#yarn install --frozen-lockfile --network-timeout 600000
yarn install --network-timeout 600000
COPY --chown=node:node . .
@ -41,7 +38,7 @@ RUN mkdir packages/backend/dist/skeleton packages/backend/dist/bundle \
&& tar xzf packages/backend/dist/bundle.tar.gz -C packages/backend/dist/bundle
# Stage 3 - Build the actual backend image and install production dependencies
FROM node:18-bookworm-slim
FROM node:20.18.1
# Install isolate-vm dependencies, these are needed by the @backstage/plugin-scaffolder-backend.
# Install packages needed to get utility binaries
@ -86,9 +83,7 @@ WORKDIR /app
COPY --from=build --chown=node:node /app/yarn.lock /app/package.json /app/packages/backend/dist/skeleton/ ./
RUN --mount=type=cache,target=/home/node/.cache/yarn,sharing=locked,uid=1000,gid=1000 \
yarn install --ignore-engines --production --network-timeout 600000
#yarn install --frozen-lockfile --production --network-timeout 600000
yarn install --production --network-timeout 600000
# Copy the built packages from the build stage
COPY --from=build --chown=node:node /app/packages/backend/dist/bundle/ ./