Skip to content

Commit 593dd75

Browse files
committed
Update v21 templates to include changes from #1901
1 parent c3b405d commit 593dd75

File tree

6 files changed

+51
-0
lines changed

6 files changed

+51
-0
lines changed

21/bookworm-slim/Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
1919
# libatomic1 for arm
2020
&& apt-get update && apt-get install -y ca-certificates curl wget gnupg dirmngr xz-utils libatomic1 --no-install-recommends \
2121
&& rm -rf /var/lib/apt/lists/* \
22+
# use pre-existing gpg directory, see https://github.com/nodejs/docker-node/pull/1895#issuecomment-1550389150
23+
&& export GNUPGHOME="$(mktemp -d)" \
24+
# gpg keys listed at https://github.com/nodejs/node#release-keys
2225
&& for key in \
2326
4ED778F539E3634C779C87C6D7062848A1AB005C \
2427
141F07595B7B3FFE74309A937405533BE57C7D57 \
@@ -38,6 +41,8 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
3841
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \
3942
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
4043
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
44+
&& gpgconf --kill all \
45+
&& rm -rf "$GNUPGHOME" \
4146
&& grep " node-v$NODE_VERSION-linux-$ARCH.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
4247
&& tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \
4348
&& rm "node-v$NODE_VERSION-linux-$ARCH.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \
@@ -61,6 +66,8 @@ RUN set -ex \
6166
&& savedAptMark="$(apt-mark showmanual)" \
6267
&& apt-get update && apt-get install -y ca-certificates curl wget gnupg dirmngr --no-install-recommends \
6368
&& rm -rf /var/lib/apt/lists/* \
69+
# use pre-existing gpg directory, see https://github.com/nodejs/docker-node/pull/1895#issuecomment-1550389150
70+
&& export GNUPGHOME="$(mktemp -d)" \
6471
&& for key in \
6572
6A010C5166006599AA17F08146C2130DFD2497F5 \
6673
; do \
@@ -70,6 +77,8 @@ RUN set -ex \
7077
&& curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \
7178
&& curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz.asc" \
7279
&& gpg --batch --verify yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
80+
&& gpgconf --kill all \
81+
&& rm -rf "$GNUPGHOME" \
7382
&& mkdir -p /opt \
7483
&& tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/ \
7584
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarn /usr/local/bin/yarn \

21/bookworm/Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
1515
i386) ARCH='x86';; \
1616
*) echo "unsupported architecture"; exit 1 ;; \
1717
esac \
18+
# use pre-existing gpg directory, see https://github.com/nodejs/docker-node/pull/1895#issuecomment-1550389150
19+
&& export GNUPGHOME="$(mktemp -d)" \
1820
# gpg keys listed at https://github.com/nodejs/node#release-keys
1921
&& set -ex \
2022
&& for key in \
@@ -36,6 +38,8 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
3638
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \
3739
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
3840
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
41+
&& gpgconf --kill all \
42+
&& rm -rf "$GNUPGHOME" \
3943
&& grep " node-v$NODE_VERSION-linux-$ARCH.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
4044
&& tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \
4145
&& rm "node-v$NODE_VERSION-linux-$ARCH.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \
@@ -47,6 +51,8 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
4751
ENV YARN_VERSION 1.22.19
4852

4953
RUN set -ex \
54+
# use pre-existing gpg directory, see https://github.com/nodejs/docker-node/pull/1895#issuecomment-1550389150
55+
&& export GNUPGHOME="$(mktemp -d)" \
5056
&& for key in \
5157
6A010C5166006599AA17F08146C2130DFD2497F5 \
5258
; do \
@@ -56,6 +62,8 @@ RUN set -ex \
5662
&& curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \
5763
&& curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz.asc" \
5864
&& gpg --batch --verify yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
65+
&& gpgconf --kill all \
66+
&& rm -rf "$GNUPGHOME" \
5967
&& mkdir -p /opt \
6068
&& tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/ \
6169
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarn /usr/local/bin/yarn \

21/bullseye-slim/Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
1919
# libatomic1 for arm
2020
&& apt-get update && apt-get install -y ca-certificates curl wget gnupg dirmngr xz-utils libatomic1 --no-install-recommends \
2121
&& rm -rf /var/lib/apt/lists/* \
22+
# use pre-existing gpg directory, see https://github.com/nodejs/docker-node/pull/1895#issuecomment-1550389150
23+
&& export GNUPGHOME="$(mktemp -d)" \
24+
# gpg keys listed at https://github.com/nodejs/node#release-keys
2225
&& for key in \
2326
4ED778F539E3634C779C87C6D7062848A1AB005C \
2427
141F07595B7B3FFE74309A937405533BE57C7D57 \
@@ -38,6 +41,8 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
3841
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \
3942
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
4043
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
44+
&& gpgconf --kill all \
45+
&& rm -rf "$GNUPGHOME" \
4146
&& grep " node-v$NODE_VERSION-linux-$ARCH.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
4247
&& tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \
4348
&& rm "node-v$NODE_VERSION-linux-$ARCH.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \
@@ -61,6 +66,8 @@ RUN set -ex \
6166
&& savedAptMark="$(apt-mark showmanual)" \
6267
&& apt-get update && apt-get install -y ca-certificates curl wget gnupg dirmngr --no-install-recommends \
6368
&& rm -rf /var/lib/apt/lists/* \
69+
# use pre-existing gpg directory, see https://github.com/nodejs/docker-node/pull/1895#issuecomment-1550389150
70+
&& export GNUPGHOME="$(mktemp -d)" \
6471
&& for key in \
6572
6A010C5166006599AA17F08146C2130DFD2497F5 \
6673
; do \
@@ -70,6 +77,8 @@ RUN set -ex \
7077
&& curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \
7178
&& curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz.asc" \
7279
&& gpg --batch --verify yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
80+
&& gpgconf --kill all \
81+
&& rm -rf "$GNUPGHOME" \
7382
&& mkdir -p /opt \
7483
&& tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/ \
7584
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarn /usr/local/bin/yarn \

21/bullseye/Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
1515
i386) ARCH='x86';; \
1616
*) echo "unsupported architecture"; exit 1 ;; \
1717
esac \
18+
# use pre-existing gpg directory, see https://github.com/nodejs/docker-node/pull/1895#issuecomment-1550389150
19+
&& export GNUPGHOME="$(mktemp -d)" \
1820
# gpg keys listed at https://github.com/nodejs/node#release-keys
1921
&& set -ex \
2022
&& for key in \
@@ -36,6 +38,8 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
3638
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \
3739
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
3840
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
41+
&& gpgconf --kill all \
42+
&& rm -rf "$GNUPGHOME" \
3943
&& grep " node-v$NODE_VERSION-linux-$ARCH.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
4044
&& tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \
4145
&& rm "node-v$NODE_VERSION-linux-$ARCH.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \
@@ -47,6 +51,8 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
4751
ENV YARN_VERSION 1.22.19
4852

4953
RUN set -ex \
54+
# use pre-existing gpg directory, see https://github.com/nodejs/docker-node/pull/1895#issuecomment-1550389150
55+
&& export GNUPGHOME="$(mktemp -d)" \
5056
&& for key in \
5157
6A010C5166006599AA17F08146C2130DFD2497F5 \
5258
; do \
@@ -56,6 +62,8 @@ RUN set -ex \
5662
&& curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \
5763
&& curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz.asc" \
5864
&& gpg --batch --verify yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
65+
&& gpgconf --kill all \
66+
&& rm -rf "$GNUPGHOME" \
5967
&& mkdir -p /opt \
6068
&& tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/ \
6169
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarn /usr/local/bin/yarn \

21/buster-slim/Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
1919
# libatomic1 for arm
2020
&& apt-get update && apt-get install -y ca-certificates curl wget gnupg dirmngr xz-utils libatomic1 --no-install-recommends \
2121
&& rm -rf /var/lib/apt/lists/* \
22+
# use pre-existing gpg directory, see https://github.com/nodejs/docker-node/pull/1895#issuecomment-1550389150
23+
&& export GNUPGHOME="$(mktemp -d)" \
24+
# gpg keys listed at https://github.com/nodejs/node#release-keys
2225
&& for key in \
2326
4ED778F539E3634C779C87C6D7062848A1AB005C \
2427
141F07595B7B3FFE74309A937405533BE57C7D57 \
@@ -38,6 +41,8 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
3841
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \
3942
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
4043
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
44+
&& gpgconf --kill all \
45+
&& rm -rf "$GNUPGHOME" \
4146
&& grep " node-v$NODE_VERSION-linux-$ARCH.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
4247
&& tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \
4348
&& rm "node-v$NODE_VERSION-linux-$ARCH.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \
@@ -61,6 +66,8 @@ RUN set -ex \
6166
&& savedAptMark="$(apt-mark showmanual)" \
6267
&& apt-get update && apt-get install -y ca-certificates curl wget gnupg dirmngr --no-install-recommends \
6368
&& rm -rf /var/lib/apt/lists/* \
69+
# use pre-existing gpg directory, see https://github.com/nodejs/docker-node/pull/1895#issuecomment-1550389150
70+
&& export GNUPGHOME="$(mktemp -d)" \
6471
&& for key in \
6572
6A010C5166006599AA17F08146C2130DFD2497F5 \
6673
; do \
@@ -70,6 +77,8 @@ RUN set -ex \
7077
&& curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \
7178
&& curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz.asc" \
7279
&& gpg --batch --verify yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
80+
&& gpgconf --kill all \
81+
&& rm -rf "$GNUPGHOME" \
7382
&& mkdir -p /opt \
7483
&& tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/ \
7584
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarn /usr/local/bin/yarn \

21/buster/Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
1515
i386) ARCH='x86';; \
1616
*) echo "unsupported architecture"; exit 1 ;; \
1717
esac \
18+
# use pre-existing gpg directory, see https://github.com/nodejs/docker-node/pull/1895#issuecomment-1550389150
19+
&& export GNUPGHOME="$(mktemp -d)" \
1820
# gpg keys listed at https://github.com/nodejs/node#release-keys
1921
&& set -ex \
2022
&& for key in \
@@ -36,6 +38,8 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
3638
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \
3739
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
3840
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
41+
&& gpgconf --kill all \
42+
&& rm -rf "$GNUPGHOME" \
3943
&& grep " node-v$NODE_VERSION-linux-$ARCH.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
4044
&& tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \
4145
&& rm "node-v$NODE_VERSION-linux-$ARCH.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \
@@ -47,6 +51,8 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
4751
ENV YARN_VERSION 1.22.19
4852

4953
RUN set -ex \
54+
# use pre-existing gpg directory, see https://github.com/nodejs/docker-node/pull/1895#issuecomment-1550389150
55+
&& export GNUPGHOME="$(mktemp -d)" \
5056
&& for key in \
5157
6A010C5166006599AA17F08146C2130DFD2497F5 \
5258
; do \
@@ -56,6 +62,8 @@ RUN set -ex \
5662
&& curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \
5763
&& curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz.asc" \
5864
&& gpg --batch --verify yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
65+
&& gpgconf --kill all \
66+
&& rm -rf "$GNUPGHOME" \
5967
&& mkdir -p /opt \
6068
&& tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/ \
6169
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarn /usr/local/bin/yarn \

0 commit comments

Comments
 (0)