Skip to content

Commit

Permalink
Merge pull request #3324 from fluxcd/kubectl-1.25.4
Browse files Browse the repository at this point in the history
Update kubectl and remove nsswitch.conf in flux-cli image
  • Loading branch information
stefanprodan committed Nov 17, 2022
2 parents 161c90e + da9cc00 commit 6f7cdde
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions Dockerfile
Expand Up @@ -3,18 +3,14 @@ FROM alpine:3.16 as builder
RUN apk add --no-cache ca-certificates curl

ARG ARCH=linux/amd64
ARG KUBECTL_VER=1.25.3
ARG KUBECTL_VER=1.25.4

RUN curl -sL https://storage.googleapis.com/kubernetes-release/release/v${KUBECTL_VER}/bin/${ARCH}/kubectl \
-o /usr/local/bin/kubectl && chmod +x /usr/local/bin/kubectl && \
kubectl version --client=true

FROM alpine:3.16 as flux-cli

# Create minimal nsswitch.conf file to prioritize the usage of /etc/hosts over DNS queries.
# https://github.com/gliderlabs/docker-alpine/issues/367#issuecomment-354316460
RUN [ ! -e /etc/nsswitch.conf ] && echo 'hosts: files dns' > /etc/nsswitch.conf

RUN apk add --no-cache ca-certificates

COPY --from=builder /usr/local/bin/kubectl /usr/local/bin/
Expand Down

0 comments on commit 6f7cdde

Please sign in to comment.