Skip to content

Commit 134b215

Browse files
committed
fix apt-key usage (deprecated)
1 parent 06bad6d commit 134b215

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

node-playwright-chrome/Dockerfile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,12 @@ RUN \
1414
mkdir -p /etc/default && echo 'repo_add_once=false' > /etc/default/google-chrome \
1515
&& apt update \
1616
&& apt install -y wget gnupg unzip ca-certificates xvfb xauth --no-install-recommends \
17-
&& wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
18-
&& sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \
17+
# Add Google Linux signing key
18+
&& wget -qO- https://dl-ssl.google.com/linux/linux_signing_key.pub \
19+
| gpg --dearmor \
20+
| tee /usr/share/keyrings/google-linux-signing.gpg > /dev/null \
21+
# Add Google Chrome APT repo
22+
&& sh -c 'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/google-linux-signing.gpg] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list' \
1923
&& sh -c 'echo "deb http://ftp.us.debian.org/debian trixie main non-free" >> /etc/apt/sources.list.d/fonts.list' \
2024
&& apt update \
2125
&& apt purge --auto-remove -y wget unzip \

node-puppeteer-chrome/Dockerfile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,12 @@ ENV DEBIAN_FRONTEND=noninteractive
1111
# Note: this also installs the necessary libs to make the bundled version of Chromium that Puppeteer installs work.
1212
RUN apt update \
1313
&& apt install -y wget gnupg unzip ca-certificates --no-install-recommends \
14-
&& wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
15-
&& sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \
14+
# Add Google Linux signing key
15+
&& wget -qO- https://dl-ssl.google.com/linux/linux_signing_key.pub \
16+
| gpg --dearmor \
17+
| tee /usr/share/keyrings/google-linux-signing.gpg > /dev/null \
18+
# Add Google Chrome APT repo
19+
&& sh -c 'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/google-linux-signing.gpg] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google.list' \
1620
&& sh -c 'echo "deb http://ftp.us.debian.org/debian trixie main non-free" >> /etc/apt/sources.list.d/fonts.list' \
1721
&& apt update \
1822
&& apt purge --auto-remove -y unzip \

0 commit comments

Comments
 (0)