From a58014aae7c71690ec3907bcdc94f3498d1cfbeb Mon Sep 17 00:00:00 2001 From: Mark Waite Date: Mon, 25 Nov 2024 18:46:25 -0700 Subject: [PATCH 1/3] Install git-lfs from tar.gz instead of packagecloud Install fails from packagecloud on one or more of the required platforms Use tar.gz for Debian because it is not available from packagecloud. Fixes #1953 --- debian/bookworm-slim/hotspot/Dockerfile | 18 +++++++++++------- debian/bookworm/hotspot/Dockerfile | 18 +++++++++++------- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/debian/bookworm-slim/hotspot/Dockerfile b/debian/bookworm-slim/hotspot/Dockerfile index b3bb4af8a0..f053ddbdd8 100644 --- a/debian/bookworm-slim/hotspot/Dockerfile +++ b/debian/bookworm-slim/hotspot/Dockerfile @@ -54,13 +54,17 @@ RUN apt-get update \ tzdata \ && rm -rf /var/lib/apt/lists/* -RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh -o /tmp/script.deb.sh \ - && bash /tmp/script.deb.sh \ - && rm -f /tmp/script.deb.sh \ - && apt-get install -y --no-install-recommends \ - git-lfs \ - && rm -rf /var/lib/apt/lists/* \ - && git lfs install +# Git LFS is not available from a package manager on all the platforms we support +# Download and unpack the tar.gz distribution +RUN tmpdir=$(mktemp -d) \ + && git_lfs_ver=3.6.0 \ + && arch=$(uname -m | sed -e 's,x86_64,amd64,g' -e 's,aarch64,arm64,g') \ + && cd $tmpdir \ + && curl -L -s https://github.com/git-lfs/git-lfs/releases/download/v${git_lfs_ver}/git-lfs-linux-${arch}-v${git_lfs_ver}.tar.gz | tar xzf - \ + && cd git-lfs-$git_lfs_ver \ + && bash ./install.sh \ + && cd .. \ + && rm -rf $tmpdir ENV LANG=C.UTF-8 diff --git a/debian/bookworm/hotspot/Dockerfile b/debian/bookworm/hotspot/Dockerfile index 505ea7a01d..5248a4db2b 100644 --- a/debian/bookworm/hotspot/Dockerfile +++ b/debian/bookworm/hotspot/Dockerfile @@ -54,13 +54,17 @@ RUN apt-get update \ tzdata \ && rm -rf /var/lib/apt/lists/* -RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh -o /tmp/script.deb.sh \ - && bash /tmp/script.deb.sh \ - && rm -f /tmp/script.deb.sh \ - && apt-get install -y --no-install-recommends \ - git-lfs \ - && rm -rf /var/lib/apt/lists/* \ - && git lfs install +# Git LFS is not available from a package manager on all the platforms we support +# Download and unpack the tar.gz distribution +RUN tmpdir=$(mktemp -d) \ + && git_lfs_ver=3.6.0 \ + && arch=$(uname -m | sed -e 's,x86_64,amd64,g' -e 's,aarch64,arm64,g') \ + && cd $tmpdir \ + && curl -L -s https://github.com/git-lfs/git-lfs/releases/download/v${git_lfs_ver}/git-lfs-linux-${arch}-v${git_lfs_ver}.tar.gz | tar xzf - \ + && cd git-lfs-$git_lfs_ver \ + && bash ./install.sh \ + && cd .. \ + && rm -rf $tmpdir ENV LANG=C.UTF-8 From 2aa45d5db855c4ae2e26c8fbf941e995cf96f219 Mon Sep 17 00:00:00 2001 From: Mark Waite Date: Mon, 25 Nov 2024 22:29:38 -0700 Subject: [PATCH 2/3] Silence hadolint --- debian/bookworm-slim/hotspot/Dockerfile | 16 +++++++--------- debian/bookworm/hotspot/Dockerfile | 16 +++++++--------- 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/debian/bookworm-slim/hotspot/Dockerfile b/debian/bookworm-slim/hotspot/Dockerfile index f053ddbdd8..a6a3d3737c 100644 --- a/debian/bookworm-slim/hotspot/Dockerfile +++ b/debian/bookworm-slim/hotspot/Dockerfile @@ -56,15 +56,13 @@ RUN apt-get update \ # Git LFS is not available from a package manager on all the platforms we support # Download and unpack the tar.gz distribution -RUN tmpdir=$(mktemp -d) \ - && git_lfs_ver=3.6.0 \ - && arch=$(uname -m | sed -e 's,x86_64,amd64,g' -e 's,aarch64,arm64,g') \ - && cd $tmpdir \ - && curl -L -s https://github.com/git-lfs/git-lfs/releases/download/v${git_lfs_ver}/git-lfs-linux-${arch}-v${git_lfs_ver}.tar.gz | tar xzf - \ - && cd git-lfs-$git_lfs_ver \ - && bash ./install.sh \ - && cd .. \ - && rm -rf $tmpdir +# hadolint ignore=SC2086,DL4006 +RUN git_lfs_ver=3.6.0 \ + && arch=$(uname -m | sed -e 's/x86_64/amd64/g' -e 's/aarch64/arm64/g') \ + && curl -L -s -o git-lfs.tgz https://github.com/git-lfs/git-lfs/releases/download/v${git_lfs_ver}/git-lfs-linux-${arch}-v${git_lfs_ver}.tar.gz \ + && tar xzf git-lfs.tgz \ + && bash git-lfs-*/install.sh \ + && rm -rf git-lfs* ENV LANG=C.UTF-8 diff --git a/debian/bookworm/hotspot/Dockerfile b/debian/bookworm/hotspot/Dockerfile index 5248a4db2b..5bc6e7edb7 100644 --- a/debian/bookworm/hotspot/Dockerfile +++ b/debian/bookworm/hotspot/Dockerfile @@ -56,15 +56,13 @@ RUN apt-get update \ # Git LFS is not available from a package manager on all the platforms we support # Download and unpack the tar.gz distribution -RUN tmpdir=$(mktemp -d) \ - && git_lfs_ver=3.6.0 \ - && arch=$(uname -m | sed -e 's,x86_64,amd64,g' -e 's,aarch64,arm64,g') \ - && cd $tmpdir \ - && curl -L -s https://github.com/git-lfs/git-lfs/releases/download/v${git_lfs_ver}/git-lfs-linux-${arch}-v${git_lfs_ver}.tar.gz | tar xzf - \ - && cd git-lfs-$git_lfs_ver \ - && bash ./install.sh \ - && cd .. \ - && rm -rf $tmpdir +# hadolint ignore=SC2086,DL4006 +RUN git_lfs_ver=3.6.0 \ + && arch=$(uname -m | sed -e 's/x86_64/amd64/g' -e 's/aarch64/arm64/g') \ + && curl -L -s -o git-lfs.tgz https://github.com/git-lfs/git-lfs/releases/download/v${git_lfs_ver}/git-lfs-linux-${arch}-v${git_lfs_ver}.tar.gz \ + && tar xzf git-lfs.tgz \ + && bash git-lfs-*/install.sh \ + && rm -rf git-lfs* ENV LANG=C.UTF-8 From f1cfeb4627f032bbec29e054728d7f7db9766f45 Mon Sep 17 00:00:00 2001 From: Damien Duportal Date: Tue, 26 Nov 2024 12:04:05 +0100 Subject: [PATCH 3/3] Apply suggestions from code review Co-authored-by: lemeurherveCB <137290663+lemeurherveCB@users.noreply.github.com> --- debian/bookworm-slim/hotspot/Dockerfile | 8 ++++---- debian/bookworm/hotspot/Dockerfile | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/debian/bookworm-slim/hotspot/Dockerfile b/debian/bookworm-slim/hotspot/Dockerfile index a6a3d3737c..5ae2d6a9a8 100644 --- a/debian/bookworm-slim/hotspot/Dockerfile +++ b/debian/bookworm-slim/hotspot/Dockerfile @@ -56,10 +56,10 @@ RUN apt-get update \ # Git LFS is not available from a package manager on all the platforms we support # Download and unpack the tar.gz distribution -# hadolint ignore=SC2086,DL4006 -RUN git_lfs_ver=3.6.0 \ - && arch=$(uname -m | sed -e 's/x86_64/amd64/g' -e 's/aarch64/arm64/g') \ - && curl -L -s -o git-lfs.tgz https://github.com/git-lfs/git-lfs/releases/download/v${git_lfs_ver}/git-lfs-linux-${arch}-v${git_lfs_ver}.tar.gz \ +ARG GIT_LFS_VERSION=3.6.0 +# hadolint ignore=DL4006 +RUN arch=$(uname -m | sed -e 's/x86_64/amd64/g' -e 's/aarch64/arm64/g') \ + && curl -L -s -o git-lfs.tgz "https://github.com/git-lfs/git-lfs/releases/download/v${GIT_LFS_VERSION}/git-lfs-linux-${arch}-v${GIT_LFS_VERSION}.tar.gz" \ && tar xzf git-lfs.tgz \ && bash git-lfs-*/install.sh \ && rm -rf git-lfs* diff --git a/debian/bookworm/hotspot/Dockerfile b/debian/bookworm/hotspot/Dockerfile index 5bc6e7edb7..42e43ff7b4 100644 --- a/debian/bookworm/hotspot/Dockerfile +++ b/debian/bookworm/hotspot/Dockerfile @@ -56,10 +56,10 @@ RUN apt-get update \ # Git LFS is not available from a package manager on all the platforms we support # Download and unpack the tar.gz distribution -# hadolint ignore=SC2086,DL4006 -RUN git_lfs_ver=3.6.0 \ - && arch=$(uname -m | sed -e 's/x86_64/amd64/g' -e 's/aarch64/arm64/g') \ - && curl -L -s -o git-lfs.tgz https://github.com/git-lfs/git-lfs/releases/download/v${git_lfs_ver}/git-lfs-linux-${arch}-v${git_lfs_ver}.tar.gz \ +ARG GIT_LFS_VERSION=3.6.0 +# hadolint ignore=DL4006 +RUN arch=$(uname -m | sed -e 's/x86_64/amd64/g' -e 's/aarch64/arm64/g') \ + && curl -L -s -o git-lfs.tgz "https://github.com/git-lfs/git-lfs/releases/download/v${GIT_LFS_VERSION}/git-lfs-linux-${arch}-v${GIT_LFS_VERSION}.tar.gz" \ && tar xzf git-lfs.tgz \ && bash git-lfs-*/install.sh \ && rm -rf git-lfs*