Skip to content

Commit

Permalink
Merge pull request #34 from stevenlafl/master
Browse files Browse the repository at this point in the history
Update Dockerfile to support arm, arm64 and amd64 architecture
  • Loading branch information
exelban authored Sep 23, 2024
2 parents ed2c67d + f014f00 commit 331d200
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
FROM alpine:3.17
MAINTAINER Serhiy Mitrovtsiy <[email protected]>

ARG TARGETPLATFORM
ARG KUBE_VERSION="v1.31.1"

COPY entrypoint.sh /entrypoint.sh

RUN chmod +x /entrypoint.sh && \
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then ARCHITECTURE=amd64; elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then ARCHITECTURE=arm; elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then ARCHITECTURE=arm64; else ARCHITECTURE=amd64; fi && \
chmod +x /entrypoint.sh && \
apk add --no-cache --update openssl curl ca-certificates && \
curl -L https://dl.k8s.io/release/$KUBE_VERSION/bin/linux/amd64/kubectl -o /usr/local/bin/kubectl && \
curl -L https://dl.k8s.io/release/$KUBE_VERSION/bin/linux/$ARCHITECTURE/kubectl -o /usr/local/bin/kubectl && \
chmod +x /usr/local/bin/kubectl && \
rm -rf /var/cache/apk/*

Expand Down

0 comments on commit 331d200

Please sign in to comment.