Skip to content

Commit d951a7f

Browse files
committed
Use temporary gpg directory to disable automatic use of keybox daemon
1 parent 5a5c547 commit d951a7f

File tree

9 files changed

+72
-0
lines changed

9 files changed

+72
-0
lines changed

16/alpine3.17/Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ RUN addgroup -g 1000 node \
3434
linux-headers \
3535
make \
3636
python3 \
37+
# use pre-existing gpg directory, see https://github.com/nodejs/docker-node/pull/1895#issuecomment-1550389150
38+
&& export GNUPGHOME="$(mktemp -d)" \
3739
# gpg keys listed at https://github.com/nodejs/node#release-keys
3840
&& for key in \
3941
4ED778F539E3634C779C87C6D7062848A1AB005C \
@@ -53,6 +55,8 @@ RUN addgroup -g 1000 node \
5355
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION.tar.xz" \
5456
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
5557
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
58+
&& gpgconf --kill all \
59+
&& rm -rf "$GNUPGHOME" \
5660
&& grep " node-v$NODE_VERSION.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
5761
&& tar -xf "node-v$NODE_VERSION.tar.xz" \
5862
&& cd "node-v$NODE_VERSION" \
@@ -73,6 +77,8 @@ RUN addgroup -g 1000 node \
7377
ENV YARN_VERSION 1.22.19
7478

7579
RUN apk add --no-cache --virtual .build-deps-yarn curl gnupg tar \
80+
# use pre-existing gpg directory, see https://github.com/nodejs/docker-node/pull/1895#issuecomment-1550389150
81+
&& export GNUPGHOME="$(mktemp -d)" \
7682
&& for key in \
7783
6A010C5166006599AA17F08146C2130DFD2497F5 \
7884
; do \
@@ -82,6 +88,8 @@ RUN apk add --no-cache --virtual .build-deps-yarn curl gnupg tar \
8288
&& curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \
8389
&& curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz.asc" \
8490
&& gpg --batch --verify yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
91+
&& gpgconf --kill all \
92+
&& rm -rf "$GNUPGHOME" \
8593
&& mkdir -p /opt \
8694
&& tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/ \
8795
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarn /usr/local/bin/yarn \

16/alpine3.18/Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ RUN addgroup -g 1000 node \
3434
linux-headers \
3535
make \
3636
python3 \
37+
# use pre-existing gpg directory, see https://github.com/nodejs/docker-node/pull/1895#issuecomment-1550389150
38+
&& export GNUPGHOME="$(mktemp -d)" \
3739
# gpg keys listed at https://github.com/nodejs/node#release-keys
3840
&& for key in \
3941
4ED778F539E3634C779C87C6D7062848A1AB005C \
@@ -53,6 +55,8 @@ RUN addgroup -g 1000 node \
5355
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION.tar.xz" \
5456
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
5557
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
58+
&& gpgconf --kill all \
59+
&& rm -rf "$GNUPGHOME" \
5660
&& grep " node-v$NODE_VERSION.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
5761
&& tar -xf "node-v$NODE_VERSION.tar.xz" \
5862
&& cd "node-v$NODE_VERSION" \
@@ -73,6 +77,8 @@ RUN addgroup -g 1000 node \
7377
ENV YARN_VERSION 1.22.19
7478

7579
RUN apk add --no-cache --virtual .build-deps-yarn curl gnupg tar \
80+
# use pre-existing gpg directory, see https://github.com/nodejs/docker-node/pull/1895#issuecomment-1550389150
81+
&& export GNUPGHOME="$(mktemp -d)" \
7682
&& for key in \
7783
6A010C5166006599AA17F08146C2130DFD2497F5 \
7884
; do \
@@ -82,6 +88,8 @@ RUN apk add --no-cache --virtual .build-deps-yarn curl gnupg tar \
8288
&& curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \
8389
&& curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz.asc" \
8490
&& gpg --batch --verify yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
91+
&& gpgconf --kill all \
92+
&& rm -rf "$GNUPGHOME" \
8593
&& mkdir -p /opt \
8694
&& tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/ \
8795
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarn /usr/local/bin/yarn \

18/alpine3.17/Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ RUN addgroup -g 1000 node \
3434
linux-headers \
3535
make \
3636
python3 \
37+
# use pre-existing gpg directory, see https://github.com/nodejs/docker-node/pull/1895#issuecomment-1550389150
38+
&& export GNUPGHOME="$(mktemp -d)" \
3739
# gpg keys listed at https://github.com/nodejs/node#release-keys
3840
&& for key in \
3941
4ED778F539E3634C779C87C6D7062848A1AB005C \
@@ -53,6 +55,8 @@ RUN addgroup -g 1000 node \
5355
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION.tar.xz" \
5456
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
5557
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
58+
&& gpgconf --kill all \
59+
&& rm -rf "$GNUPGHOME" \
5660
&& grep " node-v$NODE_VERSION.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
5761
&& tar -xf "node-v$NODE_VERSION.tar.xz" \
5862
&& cd "node-v$NODE_VERSION" \
@@ -73,6 +77,8 @@ RUN addgroup -g 1000 node \
7377
ENV YARN_VERSION 1.22.19
7478

7579
RUN apk add --no-cache --virtual .build-deps-yarn curl gnupg tar \
80+
# use pre-existing gpg directory, see https://github.com/nodejs/docker-node/pull/1895#issuecomment-1550389150
81+
&& export GNUPGHOME="$(mktemp -d)" \
7682
&& for key in \
7783
6A010C5166006599AA17F08146C2130DFD2497F5 \
7884
; do \
@@ -82,6 +88,8 @@ RUN apk add --no-cache --virtual .build-deps-yarn curl gnupg tar \
8288
&& curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \
8389
&& curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz.asc" \
8490
&& gpg --batch --verify yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
91+
&& gpgconf --kill all \
92+
&& rm -rf "$GNUPGHOME" \
8593
&& mkdir -p /opt \
8694
&& tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/ \
8795
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarn /usr/local/bin/yarn \

18/alpine3.18/Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ RUN addgroup -g 1000 node \
3434
linux-headers \
3535
make \
3636
python3 \
37+
# use pre-existing gpg directory, see https://github.com/nodejs/docker-node/pull/1895#issuecomment-1550389150
38+
&& export GNUPGHOME="$(mktemp -d)" \
3739
# gpg keys listed at https://github.com/nodejs/node#release-keys
3840
&& for key in \
3941
4ED778F539E3634C779C87C6D7062848A1AB005C \
@@ -53,6 +55,8 @@ RUN addgroup -g 1000 node \
5355
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION.tar.xz" \
5456
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
5557
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
58+
&& gpgconf --kill all \
59+
&& rm -rf "$GNUPGHOME" \
5660
&& grep " node-v$NODE_VERSION.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
5761
&& tar -xf "node-v$NODE_VERSION.tar.xz" \
5862
&& cd "node-v$NODE_VERSION" \
@@ -73,6 +77,8 @@ RUN addgroup -g 1000 node \
7377
ENV YARN_VERSION 1.22.19
7478

7579
RUN apk add --no-cache --virtual .build-deps-yarn curl gnupg tar \
80+
# use pre-existing gpg directory, see https://github.com/nodejs/docker-node/pull/1895#issuecomment-1550389150
81+
&& export GNUPGHOME="$(mktemp -d)" \
7682
&& for key in \
7783
6A010C5166006599AA17F08146C2130DFD2497F5 \
7884
; do \
@@ -82,6 +88,8 @@ RUN apk add --no-cache --virtual .build-deps-yarn curl gnupg tar \
8288
&& curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \
8389
&& curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz.asc" \
8490
&& gpg --batch --verify yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
91+
&& gpgconf --kill all \
92+
&& rm -rf "$GNUPGHOME" \
8593
&& mkdir -p /opt \
8694
&& tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/ \
8795
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarn /usr/local/bin/yarn \

19/alpine3.17/Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ RUN addgroup -g 1000 node \
3434
linux-headers \
3535
make \
3636
python3 \
37+
# use pre-existing gpg directory, see https://github.com/nodejs/docker-node/pull/1895#issuecomment-1550389150
38+
&& export GNUPGHOME="$(mktemp -d)" \
3739
# gpg keys listed at https://github.com/nodejs/node#release-keys
3840
&& for key in \
3941
4ED778F539E3634C779C87C6D7062848A1AB005C \
@@ -53,6 +55,8 @@ RUN addgroup -g 1000 node \
5355
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION.tar.xz" \
5456
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
5557
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
58+
&& gpgconf --kill all \
59+
&& rm -rf "$GNUPGHOME" \
5660
&& grep " node-v$NODE_VERSION.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
5761
&& tar -xf "node-v$NODE_VERSION.tar.xz" \
5862
&& cd "node-v$NODE_VERSION" \
@@ -73,6 +77,8 @@ RUN addgroup -g 1000 node \
7377
ENV YARN_VERSION 1.22.19
7478

7579
RUN apk add --no-cache --virtual .build-deps-yarn curl gnupg tar \
80+
# use pre-existing gpg directory, see https://github.com/nodejs/docker-node/pull/1895#issuecomment-1550389150
81+
&& export GNUPGHOME="$(mktemp -d)" \
7682
&& for key in \
7783
6A010C5166006599AA17F08146C2130DFD2497F5 \
7884
; do \
@@ -82,6 +88,8 @@ RUN apk add --no-cache --virtual .build-deps-yarn curl gnupg tar \
8288
&& curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \
8389
&& curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz.asc" \
8490
&& gpg --batch --verify yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
91+
&& gpgconf --kill all \
92+
&& rm -rf "$GNUPGHOME" \
8593
&& mkdir -p /opt \
8694
&& tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/ \
8795
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarn /usr/local/bin/yarn \

19/alpine3.18/Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ RUN addgroup -g 1000 node \
3434
linux-headers \
3535
make \
3636
python3 \
37+
# use pre-existing gpg directory, see https://github.com/nodejs/docker-node/pull/1895#issuecomment-1550389150
38+
&& export GNUPGHOME="$(mktemp -d)" \
3739
# gpg keys listed at https://github.com/nodejs/node#release-keys
3840
&& for key in \
3941
4ED778F539E3634C779C87C6D7062848A1AB005C \
@@ -53,6 +55,8 @@ RUN addgroup -g 1000 node \
5355
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION.tar.xz" \
5456
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
5557
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
58+
&& gpgconf --kill all \
59+
&& rm -rf "$GNUPGHOME" \
5660
&& grep " node-v$NODE_VERSION.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
5761
&& tar -xf "node-v$NODE_VERSION.tar.xz" \
5862
&& cd "node-v$NODE_VERSION" \
@@ -73,6 +77,8 @@ RUN addgroup -g 1000 node \
7377
ENV YARN_VERSION 1.22.19
7478

7579
RUN apk add --no-cache --virtual .build-deps-yarn curl gnupg tar \
80+
# use pre-existing gpg directory, see https://github.com/nodejs/docker-node/pull/1895#issuecomment-1550389150
81+
&& export GNUPGHOME="$(mktemp -d)" \
7682
&& for key in \
7783
6A010C5166006599AA17F08146C2130DFD2497F5 \
7884
; do \
@@ -82,6 +88,8 @@ RUN apk add --no-cache --virtual .build-deps-yarn curl gnupg tar \
8288
&& curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \
8389
&& curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz.asc" \
8490
&& gpg --batch --verify yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
91+
&& gpgconf --kill all \
92+
&& rm -rf "$GNUPGHOME" \
8593
&& mkdir -p /opt \
8694
&& tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/ \
8795
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarn /usr/local/bin/yarn \

20/alpine3.17/Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ RUN addgroup -g 1000 node \
3434
linux-headers \
3535
make \
3636
python3 \
37+
# use pre-existing gpg directory, see https://github.com/nodejs/docker-node/pull/1895#issuecomment-1550389150
38+
&& export GNUPGHOME="$(mktemp -d)" \
3739
# gpg keys listed at https://github.com/nodejs/node#release-keys
3840
&& for key in \
3941
4ED778F539E3634C779C87C6D7062848A1AB005C \
@@ -53,6 +55,8 @@ RUN addgroup -g 1000 node \
5355
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION.tar.xz" \
5456
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
5557
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
58+
&& gpgconf --kill all \
59+
&& rm -rf "$GNUPGHOME" \
5660
&& grep " node-v$NODE_VERSION.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
5761
&& tar -xf "node-v$NODE_VERSION.tar.xz" \
5862
&& cd "node-v$NODE_VERSION" \
@@ -73,6 +77,8 @@ RUN addgroup -g 1000 node \
7377
ENV YARN_VERSION 1.22.19
7478

7579
RUN apk add --no-cache --virtual .build-deps-yarn curl gnupg tar \
80+
# use pre-existing gpg directory, see https://github.com/nodejs/docker-node/pull/1895#issuecomment-1550389150
81+
&& export GNUPGHOME="$(mktemp -d)" \
7682
&& for key in \
7783
6A010C5166006599AA17F08146C2130DFD2497F5 \
7884
; do \
@@ -82,6 +88,8 @@ RUN apk add --no-cache --virtual .build-deps-yarn curl gnupg tar \
8288
&& curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \
8389
&& curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz.asc" \
8490
&& gpg --batch --verify yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
91+
&& gpgconf --kill all \
92+
&& rm -rf "$GNUPGHOME" \
8593
&& mkdir -p /opt \
8694
&& tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/ \
8795
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarn /usr/local/bin/yarn \

20/alpine3.18/Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ RUN addgroup -g 1000 node \
3434
linux-headers \
3535
make \
3636
python3 \
37+
# use pre-existing gpg directory, see https://github.com/nodejs/docker-node/pull/1895#issuecomment-1550389150
38+
&& export GNUPGHOME="$(mktemp -d)" \
3739
# gpg keys listed at https://github.com/nodejs/node#release-keys
3840
&& for key in \
3941
4ED778F539E3634C779C87C6D7062848A1AB005C \
@@ -53,6 +55,8 @@ RUN addgroup -g 1000 node \
5355
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION.tar.xz" \
5456
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
5557
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
58+
&& gpgconf --kill all \
59+
&& rm -rf "$GNUPGHOME" \
5660
&& grep " node-v$NODE_VERSION.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
5761
&& tar -xf "node-v$NODE_VERSION.tar.xz" \
5862
&& cd "node-v$NODE_VERSION" \
@@ -73,6 +77,8 @@ RUN addgroup -g 1000 node \
7377
ENV YARN_VERSION 1.22.19
7478

7579
RUN apk add --no-cache --virtual .build-deps-yarn curl gnupg tar \
80+
# use pre-existing gpg directory, see https://github.com/nodejs/docker-node/pull/1895#issuecomment-1550389150
81+
&& export GNUPGHOME="$(mktemp -d)" \
7682
&& for key in \
7783
6A010C5166006599AA17F08146C2130DFD2497F5 \
7884
; do \
@@ -82,6 +88,8 @@ RUN apk add --no-cache --virtual .build-deps-yarn curl gnupg tar \
8288
&& curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \
8389
&& curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz.asc" \
8490
&& gpg --batch --verify yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
91+
&& gpgconf --kill all \
92+
&& rm -rf "$GNUPGHOME" \
8593
&& mkdir -p /opt \
8694
&& tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/ \
8795
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarn /usr/local/bin/yarn \

Dockerfile-alpine.template

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ RUN addgroup -g 1000 node \
3434
linux-headers \
3535
make \
3636
python3 \
37+
# use pre-existing gpg directory, see https://github.com/nodejs/docker-node/pull/1895#issuecomment-1550389150
38+
&& export GNUPGHOME="$(mktemp -d)" \
3739
# gpg keys listed at https://github.com/nodejs/node#release-keys
3840
&& for key in \
3941
"${NODE_KEYS[@]}"
@@ -44,6 +46,8 @@ RUN addgroup -g 1000 node \
4446
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION.tar.xz" \
4547
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
4648
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
49+
&& gpgconf --kill all \
50+
&& rm -rf "$GNUPGHOME" \
4751
&& grep " node-v$NODE_VERSION.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
4852
&& tar -xf "node-v$NODE_VERSION.tar.xz" \
4953
&& cd "node-v$NODE_VERSION" \
@@ -64,6 +68,8 @@ RUN addgroup -g 1000 node \
6468
ENV YARN_VERSION 0.0.0
6569

6670
RUN apk add --no-cache --virtual .build-deps-yarn curl gnupg tar \
71+
# use pre-existing gpg directory, see https://github.com/nodejs/docker-node/pull/1895#issuecomment-1550389150
72+
&& export GNUPGHOME="$(mktemp -d)" \
6773
&& for key in \
6874
"${YARN_KEYS[@]}"
6975
; do \
@@ -73,6 +79,8 @@ RUN apk add --no-cache --virtual .build-deps-yarn curl gnupg tar \
7379
&& curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \
7480
&& curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz.asc" \
7581
&& gpg --batch --verify yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
82+
&& gpgconf --kill all \
83+
&& rm -rf "$GNUPGHOME" \
7684
&& mkdir -p /opt \
7785
&& tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/ \
7886
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarn /usr/local/bin/yarn \

0 commit comments

Comments
 (0)