From 3bda9ca57079b35344ad0ed47030a9b0c8272d0a Mon Sep 17 00:00:00 2001 From: Jeppe Fihl-Pearson Date: Wed, 2 Mar 2022 16:22:32 +0000 Subject: [PATCH] fix(docker): fix installation of git-lfs in armv7 image This uses a similar pattern than what is used for `GOSU_ARCH` to map the `TARGETPLATFORM` argument into the name of the architecture git-lfs use for their release binaries, as "linux/arm/v7" otherwise would be mapped into "v7" which is wrong. --- docker-base/Dockerfile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docker-base/Dockerfile b/docker-base/Dockerfile index e9c0f4394f..1e05829296 100644 --- a/docker-base/Dockerfile +++ b/docker-base/Dockerfile @@ -32,7 +32,12 @@ RUN apk add --no-cache ca-certificates curl git unzip bash openssh libcap dumb-i cd /tmp/build && \ # git-lfs - curl -L -s --output git-lfs.tar.gz "https://github.com/git-lfs/git-lfs/releases/download/v${GIT_LFS_VERSION}/git-lfs-linux-${TARGETPLATFORM##*/}-v${GIT_LFS_VERSION}.tar.gz" && \ + case ${TARGETPLATFORM} in \ + "linux/amd64") GIT_LFS_ARCH=amd64 ;; \ + "linux/arm64") GIT_LFS_ARCH=arm64 ;; \ + "linux/arm/v7") GIT_LFS_ARCH=arm ;; \ + esac && \ + curl -L -s --output git-lfs.tar.gz "https://github.com/git-lfs/git-lfs/releases/download/v${GIT_LFS_VERSION}/git-lfs-linux-${GIT_LFS_ARCH}-v${GIT_LFS_VERSION}.tar.gz" && \ tar -xf git-lfs.tar.gz && \ chmod +x git-lfs && \ mv git-lfs /usr/bin/git-lfs && \