-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
6 changed files
with
70 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Builder stage | ||
FROM docker.io/library/golang:1.23.4 AS builder | ||
WORKDIR /build | ||
# Copy go mod files and download dependencies | ||
COPY ./src/go.mod ./src/go.sum ./ | ||
RUN go mod download | ||
# Copy the rest of the source code | ||
COPY ./src/ ./ | ||
# Build the helmizer binary with CGO disabled for a fully static binary | ||
RUN CGO_ENABLED=0 go build -ldflags="-s -w" -o helmizer . | ||
|
||
# Final stage | ||
FROM scratch AS final | ||
# Copy the helmizer binary to a known location | ||
COPY --from=builder /build/helmizer /usr/local/bin/helmizer | ||
# By default, set the binary as the entry point in case you want to run it | ||
ENTRYPOINT ["/usr/local/bin/helmizer"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters