Skip to content

Commit

Permalink
reduce binary size
Browse files Browse the repository at this point in the history
Signed-off-by: Anurag <kranurag7+81210977@users.noreply.github.com>
  • Loading branch information
Anurag committed Oct 5, 2023
1 parent f95aa6b commit faf3553
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion images/caph/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ COPY . /src/cluster-api-provider-hetzner
WORKDIR /src/cluster-api-provider-hetzner
RUN --mount=type=cache,target=/root/.cache --mount=type=cache,target=/go/pkg \
GOOS=${TARGETOS} GOARCH=${TARGETARCH} CGO_ENABLED=0 \
go build -mod=vendor -ldflags "${LDFLAGS} -extldflags '-static'" \
go build -mod=vendor -trimpath -ldflags "-s -w ${LDFLAGS} -extldflags '-static'" \
-o manager main.go

FROM --platform=${BUILDPLATFORM} gcr.io/distroless/static:nonroot
Expand Down

0 comments on commit faf3553

Please sign in to comment.