Skip to content

Commit c60b38f

Browse files
committed
add dev tools
1 parent 3ab460c commit c60b38f

File tree

1 file changed

+63
-0
lines changed

1 file changed

+63
-0
lines changed

Dockerfile

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
FROM alpine
2+
3+
# Ignore to update versions here
4+
# docker build --no-cache --build-arg KUBECTL_VERSION=${tag} --build-arg HELM_VERSION=${helm} --build-arg KUSTOMIZE_VERSION=${kustomize_version} -t ${image}:${tag} .
5+
ARG HELM_VERSION=3.9.0
6+
ARG KUBECTL_VERSION=1.24.1
7+
ARG KUSTOMIZE_VERSION=v4.5.5
8+
9+
# Install helm (latest release)
10+
# ENV BASE_URL="https://storage.googleapis.com/kubernetes-helm"
11+
ENV BASE_URL="https://get.helm.sh"
12+
ENV TAR_FILE="helm-v${HELM_VERSION}-linux-amd64.tar.gz"
13+
RUN apk add --update --no-cache curl ca-certificates bash git && \
14+
curl -sL ${BASE_URL}/${TAR_FILE} | tar -xvz && \
15+
mv linux-amd64/helm /usr/bin/helm && \
16+
chmod +x /usr/bin/helm && \
17+
rm -rf linux-amd64
18+
19+
# add helm-diff
20+
RUN helm plugin install https://github.com/databus23/helm-diff && rm -rf /tmp/helm-*
21+
22+
# add helm-unittest
23+
RUN helm plugin install https://github.com/quintush/helm-unittest && rm -rf /tmp/helm-*
24+
25+
# add helm-push
26+
RUN helm plugin install https://github.com/chartmuseum/helm-push && rm -rf /tmp/helm-*
27+
28+
# Install kubectl (same version of aws esk)
29+
RUN curl -sLO https://storage.googleapis.com/kubernetes-release/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl && \
30+
mv kubectl /usr/bin/kubectl && \
31+
chmod +x /usr/bin/kubectl
32+
33+
# Install kustomize (latest release)
34+
RUN curl -sLO https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2F${KUSTOMIZE_VERSION}/kustomize_${KUSTOMIZE_VERSION}_linux_amd64.tar.gz && \
35+
tar xvzf kustomize_${KUSTOMIZE_VERSION}_linux_amd64.tar.gz && \
36+
mv kustomize /usr/bin/kustomize && \
37+
chmod +x /usr/bin/kustomize
38+
39+
# Install jq
40+
RUN apk add --update --no-cache jq
41+
42+
# Install yq
43+
RUN apk add --update --no-cache yq
44+
45+
# Install for envsubst
46+
RUN apk add --update --no-cache gettext
47+
48+
# Install yq
49+
RUN apk add --update --no-cache yq
50+
51+
# Install kubens
52+
RUN curl -sL -o /usr/local/bin/kubens https://raw.githubusercontent.com/ahmetb/kubectx/master/kubens \
53+
&& chmod +x /usr/local/bin/kubens
54+
55+
# Install kubectx
56+
RUN curl -sL -o /usr/local/bin/kubectx https://raw.githubusercontent.com/ahmetb/kubectx/master/kubectx \
57+
&& chmod +x /usr/local/bin/kubectx
58+
59+
WORKDIR /apps
60+
61+
RUN mkdir -p /apps/.kube
62+
63+
ENV KUBECONFIG=/apps/.kube/config

0 commit comments

Comments
 (0)