Skip to content

Commit

Permalink
fix: Change to distroless. Fixes #8805 (#8806)
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Collins <alex_collins@intuit.com>
  • Loading branch information
alexec committed May 19, 2022
1 parent 8728265 commit bc01003
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -92,42 +92,39 @@ RUN --mount=type=cache,target=/root/.cache/go-build make dist/argo

####################################################################################################

FROM scratch as argoexec
FROM gcr.io/distroless/static as argoexec

COPY --from=argoexec-build /usr/local/bin/kubectl /bin/
COPY --from=argoexec-build /usr/local/bin/jq /bin/
COPY --from=argoexec-build /go/src/github.com/argoproj/argo-workflows/dist/argoexec /bin/
COPY --from=argoexec-build /etc/mime.types /etc/mime.types
COPY --from=argoexec-build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY hack/ssh_known_hosts /etc/ssh/
COPY hack/nsswitch.conf /etc/

RUN --mount=from=busybox:latest,src=/bin/,dst=/bin/ mkdir -m 1755 /tmp

ENTRYPOINT [ "argoexec" ]

####################################################################################################

FROM scratch as workflow-controller
FROM gcr.io/distroless/static as workflow-controller

USER 8737

COPY --chown=8737 --from=workflow-controller-build /usr/share/zoneinfo /usr/share/zoneinfo
COPY hack/ssh_known_hosts /etc/ssh/
COPY hack/nsswitch.conf /etc/
COPY --chown=8737 --from=workflow-controller-build /go/src/github.com/argoproj/argo-workflows/dist/workflow-controller /bin/

ENTRYPOINT [ "workflow-controller" ]

####################################################################################################

FROM scratch as argocli
FROM gcr.io/distroless/static as argocli

USER 8737

WORKDIR /home/argo

COPY hack/ssh_known_hosts /etc/ssh/
COPY hack/nsswitch.conf /etc/
COPY --from=argocli-build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=argocli-build /go/src/github.com/argoproj/argo-workflows/dist/argo /bin/

ENTRYPOINT [ "argo" ]

0 comments on commit bc01003

Please sign in to comment.