Skip to content

Commit 29463d7

Browse files
Add a note about upgrading docker version
1 parent ba95942 commit 29463d7

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

Dockerfile

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
1-
# Keep in sync with default Dockerfile
2-
FROM node:22.12.0-slim@sha256:a4b757cd491c7f0b57f57951f35f4e85b7e1ad54dbffca4cf9af0725e1650cd8
1+
# When updating the version of the base container, please use the
2+
# SHA256 listed under 'Index digest' on Docker Hub,
3+
# not the 'Manifest digest'.
4+
#
5+
# This ensures that when pulling the container, Docker will detect
6+
# the platform and pull the correct image (if it exists)
7+
#
8+
# Alternate way of determining the Index digest using the docker CLI.
9+
#
10+
# $ docker buildx imagetools inspect node:22.12.0-slim
11+
# Name: docker.io/library/node:22.12.0-slim
12+
# MediaType: application/vnd.oci.image.index.v1+json
13+
# Digest: sha256:a4b757cd491c7f0b57f57951f35f4e85b7e1ad54dbffca4cf9af0725e1650cd8
14+
# And use this digest in FROM
15+
ARG base_sha=a4b757cd491c7f0b57f57951f35f4e85b7e1ad54dbffca4cf9af0725e1650cd8
16+
17+
FROM node:22.12.0-slim@sha256:${base_sha}
318

419
ENV NODE_OPTIONS=--max-old-space-size=4096
520

0 commit comments

Comments
 (0)