Skip to content

Commit d51b0d3

Browse files
Bump Node version from 16.x LTS to 20.x LTS
… and use the new Nodesource `nodistro` distribution via their install script (which is their recommended installation method… again 😅). This commit also bumps Gosu from 1.16 to 1.17.
1 parent 5e401f9 commit d51b0d3

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

Dockerfile

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ ARG RUBYGEMS_VERSION_ARG="" \
1414
BUNDLER_VERSION_ARG=""
1515

1616
# Define dependencies base versions
17-
ENV NODE_VERSION="16" \
18-
GOSU_VERSION="1.16"
17+
# Note: NodeJS is capped to 14.x on Jessie and 16.x on Stretch (due to `libc` requirements)
18+
ENV NODE_VERSION="20" \
19+
GOSU_VERSION="1.17"
1920

2021
# Define some default variables
2122
ENV PORT="5000" \
@@ -95,11 +96,11 @@ RUN set -eux; \
9596
esac > /etc/apt/sources.list.d/pgdg.list; \
9697
\
9798
# Add NodeJS APT repository
98-
curl -sSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | gpg --dearmor > /etc/apt/trusted.gpg.d/apt.nodesource.com.gpg; \
9999
case ${debianReleaseCodename} in \
100-
jessie) echo "deb https://deb.nodesource.com/node_14.x ${debianReleaseCodename} main" ;; \
101-
*) echo "deb https://deb.nodesource.com/node_${NODE_VERSION}.x ${debianReleaseCodename} main" ;; \
102-
esac > /etc/apt/sources.list.d/nodesource.list; \
100+
jessie) curl -fsSL https://deb.nodesource.com/setup_14.x ;; \
101+
stretch) curl -fsSL https://deb.nodesource.com/setup_16.x ;; \
102+
*) curl -fsSL https://deb.nodesource.com/setup_${NODE_VERSION}.x ;; \
103+
esac | bash; \
103104
\
104105
# Install everything
105106
apt-get update; \
@@ -124,7 +125,7 @@ RUN set -eux; \
124125
esac;
125126

126127
# Install `gosu`
127-
ARG TARGETARCH
128+
ARG TARGETARCH # provided by Docker multi-platform support: https://docs.docker.com/build/guide/multi-platform
128129
RUN set -eux; \
129130
osType="$(sed -n 's|^ID=||p' /etc/os-release)"; \
130131
export GNUPGHOME="$(mktemp -d)"; \

0 commit comments

Comments
 (0)