aws-iam-authenticator/Dockerfile
Stefan Reimer 375bf99504
All checks were successful
ZeroDownTime/aws-iam-authenticator/pipeline/head This commit looks good
ZeroDownTime/aws-iam-authenticator/pipeline/tag This commit looks good
fix: make non-root user work
2025-01-17 12:00:18 +00:00

25 lines
759 B
Docker

ARG DISTRO_VERSION="3.21"
ARG VERSION="0.6.29"
FROM alpine:${DISTRO_VERSION}
ARG DISTRO_VERSION
ARG VERSION
RUN apk add --update ca-certificates
RUN echo "@kubezero https://cdn.zero-downtime.net/alpine/v${DISTRO_VERSION}/kubezero" >> "/etc/apk/repositories"
RUN wget -q -O /etc/apk/keys/stefan@zero-downtime.net-61bb6bfb.rsa.pub https://cdn.zero-downtime.net/alpine/stefan@zero-downtime.net-61bb6bfb.rsa.pub
RUN apk -U --no-cache add \
aws-iam-authenticator@kubezero=~$VERSION
FROM scratch
COPY --from=0 /etc/passwd /etc/passwd
COPY --from=0 /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=0 /lib/ld-musl-*.so.1 /lib/
COPY --from=0 /usr/bin/aws-iam-authenticator /aws-iam-authenticator
USER 65534
ENTRYPOINT ["/aws-iam-authenticator"]