From 224d7bf847b6287f8aa27407d7238671a94efd70 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Wed, 15 Jan 2025 12:03:19 -0800 Subject: [PATCH] fix(docker): install gpg on slim images (#34340) --- packages/playwright-core/bin/reinstall_msedge_beta_linux.sh | 6 ++++++ packages/playwright-core/bin/reinstall_msedge_dev_linux.sh | 6 ++++++ .../playwright-core/bin/reinstall_msedge_stable_linux.sh | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/packages/playwright-core/bin/reinstall_msedge_beta_linux.sh b/packages/playwright-core/bin/reinstall_msedge_beta_linux.sh index ececd05ace..a1531a95d0 100755 --- a/packages/playwright-core/bin/reinstall_msedge_beta_linux.sh +++ b/packages/playwright-core/bin/reinstall_msedge_beta_linux.sh @@ -32,6 +32,12 @@ if ! command -v curl >/dev/null; then apt-get install -y curl fi +# GnuPG is not preinstalled in slim images +if ! command -v gpg >/dev/null; then + apt-get update + apt-get install -y gpg +fi + # 3. Add the GPG key, the apt repo, update the apt cache, and install the package curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > /tmp/microsoft.gpg install -o root -g root -m 644 /tmp/microsoft.gpg /etc/apt/trusted.gpg.d/ diff --git a/packages/playwright-core/bin/reinstall_msedge_dev_linux.sh b/packages/playwright-core/bin/reinstall_msedge_dev_linux.sh index 6ab84c3100..7fde34e5b8 100755 --- a/packages/playwright-core/bin/reinstall_msedge_dev_linux.sh +++ b/packages/playwright-core/bin/reinstall_msedge_dev_linux.sh @@ -32,6 +32,12 @@ if ! command -v curl >/dev/null; then apt-get install -y curl fi +# GnuPG is not preinstalled in slim images +if ! command -v gpg >/dev/null; then + apt-get update + apt-get install -y gpg +fi + # 3. Add the GPG key, the apt repo, update the apt cache, and install the package curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > /tmp/microsoft.gpg install -o root -g root -m 644 /tmp/microsoft.gpg /etc/apt/trusted.gpg.d/ diff --git a/packages/playwright-core/bin/reinstall_msedge_stable_linux.sh b/packages/playwright-core/bin/reinstall_msedge_stable_linux.sh index e66f85bbba..4acb1dbf1b 100755 --- a/packages/playwright-core/bin/reinstall_msedge_stable_linux.sh +++ b/packages/playwright-core/bin/reinstall_msedge_stable_linux.sh @@ -32,6 +32,12 @@ if ! command -v curl >/dev/null; then apt-get install -y curl fi +# GnuPG is not preinstalled in slim images +if ! command -v gpg >/dev/null; then + apt-get update + apt-get install -y gpg +fi + # 3. Add the GPG key, the apt repo, update the apt cache, and install the package curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > /tmp/microsoft.gpg install -o root -g root -m 644 /tmp/microsoft.gpg /etc/apt/trusted.gpg.d/