|
| 1 | +FROM alpine:3.19 |
| 2 | + |
| 3 | +LABEL org.opencontainers.image.source https://github.com/johanneswuerbach/5min-idp |
| 4 | + |
| 5 | +RUN apk add --no-cache \ |
| 6 | + bash curl git jq bash-completion docker-cli && \ |
| 7 | + mkdir -p /etc/bash_completion.d |
| 8 | + |
| 9 | +# inject the target architecture (https://docs.docker.com/reference/dockerfile/#automatic-platform-args-in-the-global-scope) |
| 10 | +ARG TARGETARCH |
| 11 | + |
| 12 | +# install kubectl |
| 13 | +RUN curl -fsSL "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/$TARGETARCH/kubectl" > /tmp/kubectl && \ |
| 14 | + install -o root -g root -m 0755 /tmp/kubectl /usr/local/bin/kubectl && \ |
| 15 | + kubectl completion bash > /etc/bash_completion.d/kubectl && \ |
| 16 | + rm /tmp/kubectl |
| 17 | + |
| 18 | +# install helm (https://github.com/helm/helm/releases) |
| 19 | +RUN mkdir /tmp/helm && \ |
| 20 | + curl -fsSL https://get.helm.sh/helm-v3.14.4-linux-${TARGETARCH}.tar.gz > /tmp/helm/helm.tar.gz && \ |
| 21 | + tar -zxvf /tmp/helm/helm.tar.gz -C /tmp/helm && \ |
| 22 | + install -o root -g root -m 0755 /tmp/helm/linux-${TARGETARCH}/helm /usr/local/bin/helm && \ |
| 23 | + helm completion bash > /etc/bash_completion.d/helm && \ |
| 24 | + rm -rf /tmp/helm |
| 25 | + |
| 26 | +# install kind https://kind.sigs.k8s.io/docs/user/quick-start/#installing-from-release-binaries |
| 27 | +RUN curl -fsSL https://kind.sigs.k8s.io/dl/v0.22.0/kind-linux-${TARGETARCH} > /tmp/kind && \ |
| 28 | + install -o root -g root -m 0755 /tmp/kind /usr/local/bin/kind && \ |
| 29 | + rm /tmp/kind |
| 30 | + |
| 31 | +# install terraform (https://github.com/hashicorp/terraform/releases) |
| 32 | +RUN mkdir /tmp/terraform && \ |
| 33 | + curl -fsSL https://releases.hashicorp.com/terraform/1.8.1/terraform_1.8.1_linux_${TARGETARCH}.zip > /tmp/terraform/terraform.zip && \ |
| 34 | + unzip /tmp/terraform/terraform.zip -d /tmp/terraform && \ |
| 35 | + install -o root -g root -m 0755 /tmp/terraform/terraform /usr/local/bin/terraform && \ |
| 36 | + rm -rf /tmp/terraform |
| 37 | + |
| 38 | +# install yq |
| 39 | +RUN curl -fsSL https://github.com/mikefarah/yq/releases/latest/download/yq_linux_${TARGETARCH} > /tmp/yq && \ |
| 40 | + install -o root -g root -m 0755 /tmp/yq /usr/local/bin/yq && \ |
| 41 | + yq shell-completion bash > /etc/bash_completion.d/yq && \ |
| 42 | + rm /tmp/yq |
| 43 | + |
| 44 | +# install humctl (https://github.com/humanitec/cli/releases) |
| 45 | +RUN mkdir /tmp/humctl && \ |
| 46 | + curl -fsSL https://github.com/humanitec/cli/releases/download/v0.21.0/cli_0.21.0_linux_${TARGETARCH}.tar.gz > /tmp/humctl/humctl.tar.gz && \ |
| 47 | + tar -zxvf /tmp/humctl/humctl.tar.gz -C /tmp/humctl && \ |
| 48 | + install -o root -g root -m 0755 /tmp/humctl/humctl /usr/local/bin/humctl && \ |
| 49 | + humctl completion bash > /etc/bash_completion.d/humctl && \ |
| 50 | + rm -rf /tmp/humctl |
| 51 | + |
| 52 | +WORKDIR /app |
| 53 | + |
| 54 | +ENTRYPOINT ["/bin/bash"] |
0 commit comments