From 919fb2ab9ac4a45737daf17d4328750b8429eeca Mon Sep 17 00:00:00 2001 From: amitza Date: Thu, 12 Sep 2024 14:27:42 +0300 Subject: [PATCH 1/2] first optimizations --- .dockerignore | 7 ++++++- .github/workflows/lava.yml | 3 +++ cmd/lavad/Dockerfile | 7 ++++--- cmd/lavad/Dockerfile.Cosmovisor | 5 ++++- cmd/lavap/Dockerfile | 9 +++++---- 5 files changed, 22 insertions(+), 9 deletions(-) diff --git a/.dockerignore b/.dockerignore index 0370155b5f..ad89aae4a9 100644 --- a/.dockerignore +++ b/.dockerignore @@ -24,4 +24,9 @@ go.work.sum Dockerfile docker/docker-compose.* -cmd/**/Dockerfile \ No newline at end of file +cmd/**/Dockerfile + +.dockerignore +.gcloudignore + +Makefile \ No newline at end of file diff --git a/.github/workflows/lava.yml b/.github/workflows/lava.yml index 5b0dad8e36..0f814da682 100644 --- a/.github/workflows/lava.yml +++ b/.github/workflows/lava.yml @@ -423,6 +423,9 @@ jobs: uses: docker/build-push-action@v5 continue-on-error: true with: + provenance: false + sbom: false + context: . tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} file: cmd/${{ matrix.binary }}/Dockerfile diff --git a/cmd/lavad/Dockerfile b/cmd/lavad/Dockerfile index 506990e30f..00828f1482 100644 --- a/cmd/lavad/Dockerfile +++ b/cmd/lavad/Dockerfile @@ -14,11 +14,12 @@ RUN apk add --no-cache \ WORKDIR /lava -COPY go.mod go.sum ./ - +ENV GOCACHE=/root/.cache/go-build RUN --mount=type=cache,target=/root/.cache/go-build \ --mount=type=cache,target=/root/go/pkg/mod \ - go mod download + --mount=type=bind,source=go.sum,target=go.sum \ + --mount=type=bind,source=go.mod,target=go.mod \ + go mod download -x COPY . . diff --git a/cmd/lavad/Dockerfile.Cosmovisor b/cmd/lavad/Dockerfile.Cosmovisor index f0612bfe0a..332b2b6f57 100644 --- a/cmd/lavad/Dockerfile.Cosmovisor +++ b/cmd/lavad/Dockerfile.Cosmovisor @@ -15,9 +15,12 @@ WORKDIR /lava COPY go.mod go.sum ./ +ENV GOCACHE=/root/.cache/go-build RUN --mount=type=cache,target=/root/.cache/go-build \ --mount=type=cache,target=/root/go/pkg/mod \ - go mod download + --mount=type=bind,source=go.sum,target=go.sum \ + --mount=type=bind,source=go.mod,target=go.mod \ + go mod download -x COPY . . diff --git a/cmd/lavap/Dockerfile b/cmd/lavap/Dockerfile index 9da381095e..bf83e92d5a 100644 --- a/cmd/lavap/Dockerfile +++ b/cmd/lavap/Dockerfile @@ -14,12 +14,13 @@ RUN apk add --no-cache \ WORKDIR /lava -COPY go.mod go.sum ./ - +ENV GOCACHE=/root/.cache/go-build RUN --mount=type=cache,target=/root/.cache/go-build \ --mount=type=cache,target=/root/go/pkg/mod \ - go mod download - + --mount=type=bind,source=go.sum,target=go.sum \ + --mount=type=bind,source=go.mod,target=go.mod \ + go mod download -x + COPY . . ARG GIT_VERSION From 15e19223f000fd0eac408e9fadb3cc375dc63686 Mon Sep 17 00:00:00 2001 From: amitza Date: Thu, 12 Sep 2024 14:39:02 +0300 Subject: [PATCH 2/2] update deps --- .github/workflows/lava.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/lava.yml b/.github/workflows/lava.yml index 0f814da682..6ee6658571 100644 --- a/.github/workflows/lava.yml +++ b/.github/workflows/lava.yml @@ -393,7 +393,6 @@ jobs: contents: write packages: write id-token: write - needs: [test-consensus, test-protocol] runs-on: ubuntu-latest strategy: matrix: