Skip to content

Commit

Permalink
feat: use smaller distroless images for released containers (#1092)
Browse files Browse the repository at this point in the history
  • Loading branch information
mowies committed Mar 23, 2023
1 parent 8608f11 commit 8a7a6af
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions klt-cert-manager/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ RUN controller-gen object:headerFile="hack/boilerplate.go.txt" paths="./..." &&
-X main.buildVersion=${RELEASE_VERSION}" \
-a -o manager main.go

FROM gcr.io/distroless/base-debian11:debug-nonroot AS debug
FROM gcr.io/distroless/static-debian11:debug-nonroot AS debug

LABEL org.opencontainers.image.source="https://github.com/keptn/lifecycle-toolkit" \
org.opencontainers.image.url="https://keptn.sh" \
Expand All @@ -45,7 +45,7 @@ COPY --from=builder /workspace/manager .

ENTRYPOINT ["/manager"]

FROM gcr.io/distroless/base-debian11:nonroot AS production
FROM gcr.io/distroless/static-debian11:nonroot AS production

LABEL org.opencontainers.image.source="https://github.com/keptn/lifecycle-toolkit/klt-cert-manager" \
org.opencontainers.image.url="https://keptn.sh" \
Expand Down
4 changes: 2 additions & 2 deletions metrics-operator/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ RUN controller-gen object:headerFile="hack/boilerplate.go.txt" paths="./..." &&
-X common.buildVersion=${RELEASE_VERSION}" \
-o bin/manager main.go

FROM gcr.io/distroless/base-debian11:debug-nonroot AS debug
FROM gcr.io/distroless/static-debian11:debug-nonroot AS debug

LABEL org.opencontainers.image.source="https://github.com/keptn/lifecycle-toolkit/metrics-operator" \
org.opencontainers.image.url="https://keptn.sh" \
Expand All @@ -43,7 +43,7 @@ COPY --from=builder /workspace/bin/manager .

ENTRYPOINT ["/manager"]

FROM gcr.io/distroless/base-debian11:nonroot AS production
FROM gcr.io/distroless/static-debian11:nonroot AS production

LABEL org.opencontainers.image.source="https://github.com/keptn/lifecycle-toolkit" \
org.opencontainers.image.url="https://keptn.sh" \
Expand Down
4 changes: 2 additions & 2 deletions operator/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ RUN controller-gen object:headerFile="hack/boilerplate.go.txt" paths="./..." &&
-X common.buildVersion=${RELEASE_VERSION}" \
-o bin/manager main.go

FROM gcr.io/distroless/base-debian11:debug-nonroot AS debug
FROM gcr.io/distroless/static-debian11:debug-nonroot AS debug

LABEL org.opencontainers.image.source="https://github.com/keptn/lifecycle-toolkit" \
org.opencontainers.image.url="https://keptn.sh" \
Expand All @@ -43,7 +43,7 @@ COPY --from=builder /workspace/bin/manager .

ENTRYPOINT ["/manager"]

FROM gcr.io/distroless/base-debian11:nonroot AS production
FROM gcr.io/distroless/static-debian11:nonroot AS production

LABEL org.opencontainers.image.source="https://github.com/keptn/lifecycle-toolkit" \
org.opencontainers.image.url="https://keptn.sh" \
Expand Down
4 changes: 2 additions & 2 deletions scheduler/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ RUN GOOS=$TARGETOS GOARCH=$TARGETARCH go build -ldflags "\
-w" \
-o bin/kube-scheduler cmd/scheduler/main.go

FROM gcr.io/distroless/base-debian11:debug-nonroot AS debug
FROM gcr.io/distroless/static-debian11:debug-nonroot AS debug

LABEL org.opencontainers.image.source="https://github.com/keptn/lifecycle-toolkit" \
org.opencontainers.image.url="https://keptn.sh" \
Expand All @@ -37,7 +37,7 @@ COPY --from=builder /scheduler/bin/kube-scheduler /bin/kube-scheduler
WORKDIR /bin
CMD ["kube-scheduler"]

FROM gcr.io/distroless/base-debian11:nonroot AS production
FROM gcr.io/distroless/static-debian11:nonroot AS production

LABEL org.opencontainers.image.source="https://github.com/keptn/lifecycle-toolkit" \
org.opencontainers.image.url="https://keptn.sh" \
Expand Down

0 comments on commit 8a7a6af

Please sign in to comment.