-
Notifications
You must be signed in to change notification settings - Fork 16
/
Dockerfile
46 lines (38 loc) · 1.56 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
FROM alpine:3.18.8
ARG KUBECTL_VERSION=v1.27.16
ARG HELM_VERSION=v3.14.1
ARG KUSTOMIZE_VERSION=v5.1.0
ARG TARGETOS
ARG TARGETARCH
RUN apk update && apk add \
bash \
bash-completion \
busybox-extras \
net-tools \
vim \
curl \
jq \
yq \
grep \
wget \
tcpdump \
git \
ca-certificates && \
update-ca-certificates && \
rm -rf /var/cache/apk/* && \
curl -SsLO https://get.helm.sh/helm-${HELM_VERSION}-${TARGETOS}-${TARGETARCH}.tar.gz && \
tar xf helm-${HELM_VERSION}-${TARGETOS}-${TARGETARCH}.tar.gz -C /usr/local/bin && \
mv /usr/local/bin/${TARGETOS}-${TARGETARCH}/helm /usr/local/bin && \
rm helm-${HELM_VERSION}-${TARGETOS}-${TARGETARCH}.tar.gz && \
rm -rf /usr/local/bin/${TARGETOS}-${TARGETARCH} && \
helm plugin install https://github.com/helm/helm-mapkubeapis
RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/${KUBECTL_VERSION}/bin/${TARGETOS}/${TARGETARCH}/kubectl && \
chmod +x ./kubectl && \
mv ./kubectl /usr/local/bin/kubectl && \
echo -e 'source /usr/share/bash-completion/bash_completion\nsource <(kubectl completion bash)' >>~/.bashrc
RUN curl -SsLO https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/${KUSTOMIZE_VERSION}/kustomize_${KUSTOMIZE_VERSION}_${TARGETOS}_${TARGETARCH}.tar.gz && \
tar xvzf kustomize_${KUSTOMIZE_VERSION}_${TARGETOS}_${TARGETARCH}.tar.gz && \
mv kustomize /usr/local/bin/ && \
rm kustomize_${KUSTOMIZE_VERSION}_${TARGETOS}_${TARGETARCH}.tar.gz
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
ENTRYPOINT ["entrypoint.sh"]