Skip to content

Commit

Permalink
removed mem limit, go will use up to container mem limit
Browse files Browse the repository at this point in the history
  • Loading branch information
Cufee committed Jul 9, 2024
1 parent de90d9c commit 6e5b68b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion .github/workflows/build-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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
Expand Down

0 comments on commit 6e5b68b

Please sign in to comment.