Updated Docker docs to Node 20
Signed-off-by: Andre Wanlin <awanlin@spotify.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/create-app': patch
|
||||
---
|
||||
|
||||
Updated Dockerfile base image to `node:20-bookworm-slim` from `node:18-bookworm-slim`
|
||||
@@ -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:18-bookworm-slim
|
||||
FROM node:20-bookworm-slim
|
||||
|
||||
# Set Python interpreter for `node-gyp` to use
|
||||
ENV PYTHON=/usr/bin/python3
|
||||
@@ -175,7 +175,7 @@ the repo root:
|
||||
|
||||
```dockerfile
|
||||
# Stage 1 - Create yarn install skeleton layer
|
||||
FROM node:18-bookworm-slim AS packages
|
||||
FROM node:20-bookworm-slim AS packages
|
||||
|
||||
WORKDIR /app
|
||||
COPY package.json yarn.lock ./
|
||||
@@ -190,7 +190,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-bookworm-slim AS build
|
||||
|
||||
# Set Python interpreter for `node-gyp` to use
|
||||
ENV PYTHON=/usr/bin/python3
|
||||
@@ -230,7 +230,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-bookworm-slim
|
||||
|
||||
# Set Python interpreter for `node-gyp` to use
|
||||
ENV PYTHON=/usr/bin/python3
|
||||
|
||||
@@ -28,7 +28,7 @@ The following two code snippets demonstrate this method. The first block of code
|
||||
# yarn build:backend
|
||||
#
|
||||
# Once the commands have been run, you can build the image using `yarn build-image`
|
||||
FROM node:18-bookworm-slim as build
|
||||
FROM node:20-bookworm-slim as build
|
||||
|
||||
USER node
|
||||
WORKDIR /app
|
||||
@@ -43,7 +43,7 @@ RUN yarn tsc
|
||||
# The configuration files here should match the one you use inside the Dockerfile below.
|
||||
RUN yarn build:backend --config ../../app-config.yaml
|
||||
|
||||
FROM node:18-bookworm-slim
|
||||
FROM node:20-bookworm-slim
|
||||
|
||||
# Install isolate-vm dependencies, these are needed by the @backstage/plugin-scaffolder-backend.
|
||||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
||||
|
||||
@@ -420,7 +420,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:18-bookworm-slim
|
||||
FROM node:20-bookworm-slim
|
||||
WORKDIR /app
|
||||
|
||||
COPY yarn.lock package.json packages/backend/dist/skeleton.tar.gz ./
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#
|
||||
# Once the commands have been run, you can build the image using `yarn build-image`
|
||||
|
||||
FROM node:18-bookworm-slim
|
||||
FROM node:20-bookworm-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:18-bookworm-slim
|
||||
FROM node:20-bookworm-slim
|
||||
|
||||
# Set Python interpreter for `node-gyp` to use
|
||||
ENV PYTHON=/usr/bin/python3
|
||||
|
||||
Reference in New Issue
Block a user