From 296bfded987c00736f173e7707d4bff0fdba0352 Mon Sep 17 00:00:00 2001 From: Florian JUDITH Date: Fri, 15 Sep 2023 17:09:20 -0400 Subject: [PATCH 1/5] Bump Docker base image from 'node:16-bullseye-slim' to 'node:18-bullseye-slim' Signed-off-by: Florian JUDITH --- docs/deployment/docker.md | 8 ++++---- docs/local-dev/cli-build-system.md | 2 +- packages/backend/Dockerfile | 2 +- .../templates/default-app/packages/backend/Dockerfile | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/deployment/docker.md b/docs/deployment/docker.md index 3bbf06d614..a117d39f9a 100644 --- a/docs/deployment/docker.md +++ b/docs/deployment/docker.md @@ -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 \ diff --git a/docs/local-dev/cli-build-system.md b/docs/local-dev/cli-build-system.md index b22b6dd284..94244de6fa 100644 --- a/docs/local-dev/cli-build-system.md +++ b/docs/local-dev/cli-build-system.md @@ -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 ./ diff --git a/packages/backend/Dockerfile b/packages/backend/Dockerfile index da25f9736c..24ede0e866 100644 --- a/packages/backend/Dockerfile +++ b/packages/backend/Dockerfile @@ -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. diff --git a/packages/create-app/templates/default-app/packages/backend/Dockerfile b/packages/create-app/templates/default-app/packages/backend/Dockerfile index a60fee7a9c..373ee7f40a 100644 --- a/packages/create-app/templates/default-app/packages/backend/Dockerfile +++ b/packages/create-app/templates/default-app/packages/backend/Dockerfile @@ -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 \ From 04a3f65e1555a7ef7061871c9cb204db2bcde427 Mon Sep 17 00:00:00 2001 From: Florian JUDITH Date: Fri, 15 Sep 2023 23:16:13 -0400 Subject: [PATCH 2/5] Added changeset Signed-off-by: Florian JUDITH --- .changeset/small-pugs-build.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changeset/small-pugs-build.md diff --git a/.changeset/small-pugs-build.md b/.changeset/small-pugs-build.md new file mode 100644 index 0000000000..5071ef850d --- /dev/null +++ b/.changeset/small-pugs-build.md @@ -0,0 +1,6 @@ +--- +'@backstage/create-app': major +'example-backend': major +--- + +- [#19974](https://github.com/backstage/backstage/issues/19974) Bump Docker base images to "node:18-bullseye-slim" in order to resolve compatiblity issue raised when running `yarn build-image` with Node.JS 16.x. This update follows the Docker CI update to Node 18x [#19563](https://github.com/backstage/backstage/pull/19563). From 3d2d3c4c153bd3169552bb157b25d0fadb858b97 Mon Sep 17 00:00:00 2001 From: Florian JUDITH Date: Sat, 16 Sep 2023 08:11:14 -0400 Subject: [PATCH 3/5] Fixed typos in change set Signed-off-by: Florian JUDITH --- .changeset/small-pugs-build.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.changeset/small-pugs-build.md b/.changeset/small-pugs-build.md index 5071ef850d..f610db0bbd 100644 --- a/.changeset/small-pugs-build.md +++ b/.changeset/small-pugs-build.md @@ -1,6 +1,6 @@ --- -'@backstage/create-app': major -'example-backend': major +'@backstage/create-app': patch +'example-backend': patch --- -- [#19974](https://github.com/backstage/backstage/issues/19974) Bump Docker base images to "node:18-bullseye-slim" in order to resolve compatiblity issue raised when running `yarn build-image` with Node.JS 16.x. This update follows the Docker CI update to Node 18x [#19563](https://github.com/backstage/backstage/pull/19563). +Bump Docker base images to `node:18-bullseye-slim` to fix compatibility issues raised during image build. This update aligns with the recent Github Actions update to Node 18x [#19563](https://github.com/backstage/backstage/pull/19563). From 842b920f1baa095a262a459801ef4412c658ee5e Mon Sep 17 00:00:00 2001 From: Florian JUDITH Date: Sat, 16 Sep 2023 08:20:06 -0400 Subject: [PATCH 4/5] Removed unpublished package from changeset Signed-off-by: Florian JUDITH --- .changeset/small-pugs-build.md | 1 - 1 file changed, 1 deletion(-) diff --git a/.changeset/small-pugs-build.md b/.changeset/small-pugs-build.md index f610db0bbd..4ec40a8181 100644 --- a/.changeset/small-pugs-build.md +++ b/.changeset/small-pugs-build.md @@ -1,6 +1,5 @@ --- '@backstage/create-app': patch -'example-backend': patch --- Bump Docker base images to `node:18-bullseye-slim` to fix compatibility issues raised during image build. This update aligns with the recent Github Actions update to Node 18x [#19563](https://github.com/backstage/backstage/pull/19563). From e347dc27e4856f98cc9285fb2f0ec142bc5732e6 Mon Sep 17 00:00:00 2001 From: Florian JUDITH Date: Tue, 19 Sep 2023 13:00:39 -0400 Subject: [PATCH 5/5] Update .changeset/small-pugs-build.md Co-authored-by: Johan Haals Signed-off-by: Florian JUDITH --- .changeset/small-pugs-build.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.changeset/small-pugs-build.md b/.changeset/small-pugs-build.md index 4ec40a8181..d1640340ba 100644 --- a/.changeset/small-pugs-build.md +++ b/.changeset/small-pugs-build.md @@ -2,4 +2,6 @@ '@backstage/create-app': patch --- -Bump Docker base images to `node:18-bullseye-slim` to fix compatibility issues raised during image build. This update aligns with the recent Github Actions update to Node 18x [#19563](https://github.com/backstage/backstage/pull/19563). +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`