From 6e5b68bf4cf1c3f1f7593614337d6cd39b61c88f Mon Sep 17 00:00:00 2001 From: Vovko Date: Tue, 9 Jul 2024 16:16:00 -0400 Subject: [PATCH] removed mem limit, go will use up to container mem limit --- .github/workflows/build-packages.yml | 1 - Dockerfile | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/build-packages.yml b/.github/workflows/build-packages.yml index da621a7d..7d73c7c1 100644 --- a/.github/workflows/build-packages.yml +++ b/.github/workflows/build-packages.yml @@ -79,7 +79,6 @@ jobs: file: Dockerfile build-args: | BRAND_FLAVOR=${{ env.BRAND_FLAVOR }} - GO_MEM_LIMIT=${{ env.GO_MEM_LIMIT }} - name: Build and push migrations Docker image id: push-migrations uses: docker/build-push-action@v6 diff --git a/Dockerfile b/Dockerfile index dd693ab1..2ea16148 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,5 @@ FROM golang:1.22.3-bookworm as builder -ARG GO_MEM_LIMIT=122MiB ARG BRAND_FLAVOR=red ENV BRAND_FLAVOR $BRAND_FLAVOR @@ -13,7 +12,7 @@ COPY ./ ./ # build a fully standalone binary with zero dependencies RUN --mount=type=cache,target=$GOPATH/pkg/mod go generate main.go -RUN --mount=type=cache,target=$GOPATH/pkg/mod CGO_ENABLED=1 GOOS=linux GOMEMLIMIT=$GO_MEM_LIMIT go build -o /bin/aftermath . +RUN --mount=type=cache,target=$GOPATH/pkg/mod CGO_ENABLED=1 GOOS=linux go build -o /bin/aftermath . # Make a scratch container with required files and binary FROM debian:stable-slim