From 736d7ac1afdc66ab578a9f6d0a385a91899ea459 Mon Sep 17 00:00:00 2001 From: Daniel Orbach <49489492+danielorbach@users.noreply.github.com> Date: Wed, 20 Sep 2023 17:33:58 +0000 Subject: [PATCH] Install git-lfs --- 1.20/alpine3.17/Dockerfile | 3 +++ 1.20/alpine3.18/Dockerfile | 3 +++ 1.20/bookworm/Dockerfile | 6 ++++++ 1.20/bullseye/Dockerfile | 6 ++++++ 1.21/alpine3.17/Dockerfile | 3 +++ 1.21/alpine3.18/Dockerfile | 3 +++ 1.21/bookworm/Dockerfile | 6 ++++++ 1.21/bullseye/Dockerfile | 6 ++++++ Dockerfile-linux.template | 10 ++++++++++ 9 files changed, 46 insertions(+) diff --git a/1.20/alpine3.17/Dockerfile b/1.20/alpine3.17/Dockerfile index bb5ba073..765ffb3a 100644 --- a/1.20/alpine3.17/Dockerfile +++ b/1.20/alpine3.17/Dockerfile @@ -108,6 +108,9 @@ RUN set -eux; \ \ go version +# install git-lfs for Go modules with LFS committed files +RUN apk add --no-cache git-lfs + ENV GOPATH /go ENV PATH $GOPATH/bin:$PATH RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 1777 "$GOPATH" diff --git a/1.20/alpine3.18/Dockerfile b/1.20/alpine3.18/Dockerfile index d1f30eb1..34b764c8 100644 --- a/1.20/alpine3.18/Dockerfile +++ b/1.20/alpine3.18/Dockerfile @@ -108,6 +108,9 @@ RUN set -eux; \ \ go version +# install git-lfs for Go modules with LFS committed files +RUN apk add --no-cache git-lfs + ENV GOPATH /go ENV PATH $GOPATH/bin:$PATH RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 1777 "$GOPATH" diff --git a/1.20/bookworm/Dockerfile b/1.20/bookworm/Dockerfile index 45581724..268dc868 100644 --- a/1.20/bookworm/Dockerfile +++ b/1.20/bookworm/Dockerfile @@ -122,6 +122,12 @@ RUN set -eux; \ \ go version +# install git-lfs for Go modules with LFS committed files +RUN set -eux; \ + apt-get update; \ + apt-get install -y --no-install-recommends git-lfs; \ + rm -rf /var/lib/apt/lists/* + ENV GOPATH /go ENV PATH $GOPATH/bin:$PATH RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 1777 "$GOPATH" diff --git a/1.20/bullseye/Dockerfile b/1.20/bullseye/Dockerfile index 079ce543..1c02fd27 100644 --- a/1.20/bullseye/Dockerfile +++ b/1.20/bullseye/Dockerfile @@ -128,6 +128,12 @@ RUN set -eux; \ \ go version +# install git-lfs for Go modules with LFS committed files +RUN set -eux; \ + apt-get update; \ + apt-get install -y --no-install-recommends git-lfs; \ + rm -rf /var/lib/apt/lists/* + ENV GOPATH /go ENV PATH $GOPATH/bin:$PATH RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 1777 "$GOPATH" diff --git a/1.21/alpine3.17/Dockerfile b/1.21/alpine3.17/Dockerfile index 2db04201..d277b6d0 100644 --- a/1.21/alpine3.17/Dockerfile +++ b/1.21/alpine3.17/Dockerfile @@ -118,6 +118,9 @@ RUN set -eux; \ \ go version +# install git-lfs for Go modules with LFS committed files +RUN apk add --no-cache git-lfs + ENV GOPATH /go ENV PATH $GOPATH/bin:$PATH RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 1777 "$GOPATH" diff --git a/1.21/alpine3.18/Dockerfile b/1.21/alpine3.18/Dockerfile index 37eaad79..e309119b 100644 --- a/1.21/alpine3.18/Dockerfile +++ b/1.21/alpine3.18/Dockerfile @@ -118,6 +118,9 @@ RUN set -eux; \ \ go version +# install git-lfs for Go modules with LFS committed files +RUN apk add --no-cache git-lfs + ENV GOPATH /go ENV PATH $GOPATH/bin:$PATH RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 1777 "$GOPATH" diff --git a/1.21/bookworm/Dockerfile b/1.21/bookworm/Dockerfile index 1cb6b057..dcbec60b 100644 --- a/1.21/bookworm/Dockerfile +++ b/1.21/bookworm/Dockerfile @@ -124,6 +124,12 @@ RUN set -eux; \ \ go version +# install git-lfs for Go modules with LFS committed files +RUN set -eux; \ + apt-get update; \ + apt-get install -y --no-install-recommends git-lfs; \ + rm -rf /var/lib/apt/lists/* + ENV GOPATH /go ENV PATH $GOPATH/bin:$PATH RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 1777 "$GOPATH" diff --git a/1.21/bullseye/Dockerfile b/1.21/bullseye/Dockerfile index fb43eb8d..59c34825 100644 --- a/1.21/bullseye/Dockerfile +++ b/1.21/bullseye/Dockerfile @@ -130,6 +130,12 @@ RUN set -eux; \ \ go version +# install git-lfs for Go modules with LFS committed files +RUN set -eux; \ + apt-get update; \ + apt-get install -y --no-install-recommends git-lfs; \ + rm -rf /var/lib/apt/lists/* + ENV GOPATH /go ENV PATH $GOPATH/bin:$PATH RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 1777 "$GOPATH" diff --git a/Dockerfile-linux.template b/Dockerfile-linux.template index 3687bef6..29503c4b 100644 --- a/Dockerfile-linux.template +++ b/Dockerfile-linux.template @@ -201,6 +201,16 @@ RUN set -eux; \ {{ ) else "" end -}} go version +# install git-lfs for Go modules with LFS committed files +{{ if is_alpine then ( -}} +RUN apk add --no-cache git-lfs +{{ ) else ( -}} +RUN set -eux; \ + apt-get update; \ + apt-get install -y --no-install-recommends git-lfs; \ + rm -rf /var/lib/apt/lists/* +{{ ) end -}} + ENV GOPATH /go ENV PATH $GOPATH/bin:$PATH RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 1777 "$GOPATH"