-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[action] common docker workflow with keyless cosign
- Loading branch information
Showing
4 changed files
with
44 additions
and
110 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,16 @@ | ||
# Use distroless as minimal base image to package the manager binary | ||
# Refer to https://github.com/GoogleContainerTools/distroless for more details | ||
FROM gcr.io/distroless/static:latest | ||
ARG BINPATH="docker/bin/manager" | ||
FROM golang:alpine AS builder | ||
|
||
RUN mkdir /src | ||
WORKDIR /src | ||
COPY . . | ||
|
||
RUN apk add --no-cache make git curl && \ | ||
make CGO_ENABLED=0 V=1 bin/manager | ||
|
||
FROM alpine | ||
|
||
WORKDIR / | ||
COPY $BINPATH . | ||
COPY --from=builder /src/bin/manager . | ||
ENTRYPOINT ["/manager"] |
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