Skip to content

Commit

Permalink
Get ARCH automatically in the Dockerfile (CR-2154)
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-codefresh authored Dec 11, 2020
1 parent 7f787f0 commit 8bf0639
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@ FROM prom/node-exporter:v1.0.0 AS node-exporter

FROM alpine:3.6

ARG ARCH

COPY --from=node-exporter /bin/node_exporter /bin/

ENV KUBECTL_VERSION="v1.8.8"

RUN apk add --update curl bash coreutils \
&& export ARCH=$([[ "$(uname -m)" == "aarch64" ]] && echo "arm64" || echo "amd64") \
&& curl -L https://storage.googleapis.com/kubernetes-release/release/${KUBECTL_VERSION}/bin/linux/${ARCH}/kubectl -o /usr/local/bin/kubectl \
&& chmod +x /usr/local/bin/kubectl

Expand Down

0 comments on commit 8bf0639

Please sign in to comment.