-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
23 lines (18 loc) · 889 Bytes
/
Copy pathDockerfile
File metadata and controls
23 lines (18 loc) · 889 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM alpine:latest
ARG TARGETOS=linux
ARG TARGETARCH=amd64
RUN apk add --no-cache bash curl coreutils
# Download kubectl binary and put it in /usr/local/bin
RUN set -eux; \
KUBECTL_VERSION="$(curl -fsSL https://dl.k8s.io/release/stable.txt)"; \
curl -fsSLo kubectl "https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/${TARGETOS}/${TARGETARCH}/kubectl"; \
install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl; \
rm -f kubectl
ENV HELM_VERSION="v3.20.2"
RUN curl -fSL "https://get.helm.sh/helm-${HELM_VERSION}-${TARGETOS}-${TARGETARCH}.tar.gz" -o helm.tar.gz && \
tar -zxvf helm.tar.gz && \
mv ${TARGETOS}-${TARGETARCH}/helm /usr/local/bin/helm && \
chmod +x /usr/local/bin/helm && \
rm -rf "${TARGETOS}-${TARGETARCH}" helm.tar.gz
# Add /usr/local/bin to PATH explicitly (should already be, but just to be sure)
ENV PATH="/usr/local/bin:${PATH}"