From e91ceb33ea6d9e8253e657d98c664d337c9f3baf Mon Sep 17 00:00:00 2001 From: Cian Hatton Date: Wed, 25 Jan 2023 14:05:20 +0000 Subject: [PATCH] Update Dockerfile for 4.3.x (#3057) --- .github/workflows/release.yml | 3 ++- .github/workflows/test.yml | 2 +- Dockerfile | 15 ++++++++++++--- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3fd1f916d05..960e0fc57b0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -51,4 +51,5 @@ jobs: context: . push: true tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} + build-args: | + IBC_GO_VERSION="${{ github.ref_name }}" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e2528c919ec..b738b25b726 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -56,7 +56,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: Docker Build - run: docker build . --no-cache + run: docker build . --no-cache --build-arg IBC_GO_VERSION=v4.3.0 split-test-files: runs-on: ubuntu-latest diff --git a/Dockerfile b/Dockerfile index f129f823057..3ea85251a72 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,16 +1,21 @@ FROM golang:1.20 as builder +ARG IBC_GO_VERSION + ENV GOPATH="" ENV GOMODULE="on" +# ensure the ibc go version is being specified for this image. +RUN test -n "${IBC_GO_VERSION}" + COPY go.mod . COPY go.sum . RUN go mod download -ADD testing testing -ADD modules modules -ADD LICENSE LICENSE +COPY testing testing +COPY modules modules +COPY LICENSE LICENSE COPY Makefile . @@ -18,6 +23,10 @@ RUN make build FROM ubuntu:20.04 +ARG IBC_GO_VERSION + +LABEL "org.cosmos.ibc-go" "${IBC_GO_VERSION}" + COPY --from=builder /go/build/simd /bin/simd ENTRYPOINT ["simd"]