From 9ad7f91801f0a024e16c2d843d69b41c47eddf1d Mon Sep 17 00:00:00 2001 From: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> Date: Thu, 16 Mar 2023 00:44:18 +0800 Subject: [PATCH 1/4] Dockerfile: fix installation of `gh`, et al. Needed for Homebrew/homebrew-core#125556. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 04bdf761d5..20bcddae4a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -36,7 +36,7 @@ RUN apt-get update \ uuid-runtime \ tzdata \ jq \ - && if [[ "$(. /etc/lsb-release; echo "${DISTRIB_RELEASE}" | cut -d. -f1)" -ge 18 ]]; then apt-get install gh gpg skopeo; fi \ + && if [[ "$(. /etc/lsb-release; echo "${DISTRIB_RELEASE}" | cut -d. -f1)" -ge 18 ]]; then apt-get install -y gh gpg skopeo; fi \ && apt-get remove --purge -y software-properties-common \ && apt-get autoremove --purge -y \ && rm -rf /var/lib/apt/lists/* \ From 60b1cb7afd4d8e530ca9f56353a5e968f58a0507 Mon Sep 17 00:00:00 2001 From: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> Date: Thu, 16 Mar 2023 01:07:19 +0800 Subject: [PATCH 2/4] Dockerfile: remove bash-ism --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 20bcddae4a..0be02a8865 100644 --- a/Dockerfile +++ b/Dockerfile @@ -36,7 +36,7 @@ RUN apt-get update \ uuid-runtime \ tzdata \ jq \ - && if [[ "$(. /etc/lsb-release; echo "${DISTRIB_RELEASE}" | cut -d. -f1)" -ge 18 ]]; then apt-get install -y gh gpg skopeo; fi \ + && if [ "$(. /etc/lsb-release; echo "${DISTRIB_RELEASE}" | cut -d. -f1)" -ge 18 ]; then apt-get install -y gh gpg skopeo; fi \ && apt-get remove --purge -y software-properties-common \ && apt-get autoremove --purge -y \ && rm -rf /var/lib/apt/lists/* \ From ff285217da4da8e77e0b4eb69b511d398f8a1cda Mon Sep 17 00:00:00 2001 From: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> Date: Thu, 16 Mar 2023 01:09:20 +0800 Subject: [PATCH 3/4] Use `--no-install-recommends` Co-authored-by: Ruoyu Zhong --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 0be02a8865..aa9f10d860 100644 --- a/Dockerfile +++ b/Dockerfile @@ -36,7 +36,7 @@ RUN apt-get update \ uuid-runtime \ tzdata \ jq \ - && if [ "$(. /etc/lsb-release; echo "${DISTRIB_RELEASE}" | cut -d. -f1)" -ge 18 ]; then apt-get install -y gh gpg skopeo; fi \ + && if [ "$(. /etc/lsb-release; echo "${DISTRIB_RELEASE}" | cut -d. -f1)" -ge 18 ]; then apt-get install -y --no-install-recommends gh gpg skopeo; fi \ && apt-get remove --purge -y software-properties-common \ && apt-get autoremove --purge -y \ && rm -rf /var/lib/apt/lists/* \ From 3b044a8113d30939f0b557439482a29075669338 Mon Sep 17 00:00:00 2001 From: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> Date: Thu, 16 Mar 2023 01:19:54 +0800 Subject: [PATCH 4/4] Fix `brew style` --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index aa9f10d860..373ab2627d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,8 @@ ARG DEBIAN_FRONTEND=noninteractive # hadolint ignore=DL3008 # /etc/lsb-release is checked inside the container and sets DISTRIB_RELEASE. -# shellcheck disable=SC1091,SC2154 +# We need `[` instead of `[[` because the shell is `/bin/sh`. +# shellcheck disable=SC1091,SC2154,SC2292 RUN apt-get update \ && apt-get install -y --no-install-recommends software-properties-common gnupg-agent \ && add-apt-repository -y ppa:git-core/ppa \