Merge pull request #19976 from testruction/hotfix/docker-node-18

Bump Docker base image from 'node:16-bullseye-slim' to 'node:18-bulls…
This commit is contained in:
Johan Haals
2023-09-20 13:13:00 +02:00
committed by GitHub
5 changed files with 14 additions and 7 deletions
+7
View File
@@ -0,0 +1,7 @@
---
'@backstage/create-app': patch
---
Bump Docker base images to `node:18-bullseye-slim` to fix compatibility issues raised during image build.
You can apply these change to your own `Dockerfile` by replacing `node:16-bullseye-slim` with `node:18-bullseye-slim`
+4 -4
View File
@@ -54,7 +54,7 @@ Once the host build is complete, we are ready to build our image. The following
`Dockerfile` is included when creating a new app with `@backstage/create-app`:
```Dockerfile
FROM node:16-bullseye-slim
FROM node:18-bullseye-slim
# Install isolate-vm dependencies, these are needed by the @backstage/plugin-scaffolder-backend.
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
@@ -160,7 +160,7 @@ the repo root:
```Dockerfile
# Stage 1 - Create yarn install skeleton layer
FROM node:16-bullseye-slim AS packages
FROM node:18-bullseye-slim AS packages
WORKDIR /app
COPY package.json yarn.lock ./
@@ -173,7 +173,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:16-bullseye-slim AS build
FROM node:18-bullseye-slim AS build
# Install isolate-vm dependencies, these are needed by the @backstage/plugin-scaffolder-backend.
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
@@ -211,7 +211,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:16-bullseye-slim
FROM node:18-bullseye-slim
# Install isolate-vm dependencies, these are needed by the @backstage/plugin-scaffolder-backend.
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
+1 -1
View File
@@ -418,7 +418,7 @@ The following is an example of a `Dockerfile` that can be used to package the
output of building a package with role `'backend'` into an image:
```Dockerfile
FROM node:16-bullseye-slim
FROM node:18-bullseye-slim
WORKDIR /app
COPY yarn.lock package.json packages/backend/dist/skeleton.tar.gz ./
+1 -1
View File
@@ -9,7 +9,7 @@
#
# Once the commands have been run, you can build the image using `yarn build-image`
FROM node:16-bullseye-slim
FROM node:18-bullseye-slim
# Install sqlite3 dependencies. You can skip this if you don't use sqlite3 in the image,
# in which case you should also move better-sqlite3 to "devDependencies" in package.json.
@@ -9,7 +9,7 @@
#
# Once the commands have been run, you can build the image using `yarn build-image`
FROM node:16-bullseye-slim
FROM node:18-bullseye-slim
# Install isolate-vm dependencies, these are needed by the @backstage/plugin-scaffolder-backend.
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \