-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
70 lines (57 loc) · 3.53 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
FROM alpine:3.19.1
ENV HELM_VERSION v2.17.0
ENV HELM_DIFF_VERSION v3.9.5
ENV HELM_S3_VERSION v0.16.0
ENV HELM_SECRET_VERSION v1.3.1
ENV HELM_V3_VERSION v3.14.4
ENV HELM_V3_SHA256 a5844ef2c38ef6ddf3b5a8f7d91e7e0e8ebc39a38bb3fc8013d629c1ef29c259
ENV HELMFILE_VERSION 0.164.0
ENV AWS_IAM_AUTH_VERSION 0.6.2
ENV VAULT_VERSION 1.12.3
ENV KUBECTL_VERSION v1.23.17
RUN apk --no-cache add curl bash make openssh jq ca-certificates git git-crypt gettext groff less
RUN curl -sLo /usr/local/bin/kubectl "https://storage.googleapis.com/kubernetes-release/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl" \
&& chmod +x /usr/local/bin/kubectl \
&& kubectl version --client=true
RUN curl -sLo /tmp/helm-v2.tar.gz "https://get.helm.sh/helm-${HELM_VERSION}-linux-amd64.tar.gz" \
&& tar -zxf /tmp/helm-v2.tar.gz -C /tmp/ \
&& cp /tmp/linux-amd64/helm /usr/local/bin/helm2 \
&& rm -rf /tmp/linux-amd64/ /tmp/helm-v2.tar.gz \
&& helm2 version --client
RUN curl -sLo /tmp/helmfile.tar.gz "https://github.com/helmfile/helmfile/releases/download/v${HELMFILE_VERSION}/helmfile_${HELMFILE_VERSION}_linux_amd64.tar.gz" \
&& mkdir /tmp/helmfile \
&& tar -zxf /tmp/helmfile.tar.gz -C /tmp/helmfile \
&& cp /tmp/helmfile/helmfile /usr/local/bin/helmfile \
&& rm -rf /tmp/helmfile/ /tmp/helmfile.tar.gz \
&& chmod +x /usr/local/bin/helmfile \
&& helmfile version
RUN wget "https://releases.hashicorp.com/vault/${VAULT_VERSION}/vault_${VAULT_VERSION}_linux_amd64.zip" \
&& unzip -d /bin "vault_${VAULT_VERSION}_linux_amd64.zip" \
&& rm "vault_${VAULT_VERSION}_linux_amd64.zip" \
&& vault version
RUN curl -sLo /tmp/helm-v3.tar.gz "https://get.helm.sh/helm-${HELM_V3_VERSION}-linux-amd64.tar.gz" \
&& echo "${HELM_V3_SHA256} /tmp/helm-v3.tar.gz" | sha256sum -c - \
&& tar -zxf /tmp/helm-v3.tar.gz -C /tmp/ \
&& cp /tmp/linux-amd64/helm /usr/local/bin/helm \
&& rm -rf /tmp/linux-amd64/ /tmp/helm-v3.tar.gz \
&& helm version
ENV HELM_HOME /helm
RUN mkdir -p "$(helm2 home)/plugins" \
&& helm plugin install https://github.com/databus23/helm-diff --version="${HELM_DIFF_VERSION}" \
&& helm2 plugin install https://github.com/databus23/helm-diff --version="${HELM_DIFF_VERSION}" \
&& helm plugin install https://github.com/futuresimple/helm-secrets --version="${HELM_SECRET_VERSION}" \
&& helm2 plugin install https://github.com/futuresimple/helm-secrets --version="${HELM_SECRET_VERSION}" \
&& helm plugin install https://github.com/hypnoglow/helm-s3 --version="${HELM_S3_VERSION}" \
&& helm2 plugin install https://github.com/hypnoglow/helm-s3 --version="${HELM_S3_VERSION}"
RUN curl -L -o "aws-iam-authenticator_${AWS_IAM_AUTH_VERSION}_linux_amd64" "https://github.com/kubernetes-sigs/aws-iam-authenticator/releases/download/v${AWS_IAM_AUTH_VERSION}/aws-iam-authenticator_${AWS_IAM_AUTH_VERSION}_linux_amd64" \
&& curl -L -o authenticator_checksums.txt "https://github.com/kubernetes-sigs/aws-iam-authenticator/releases/download/v${AWS_IAM_AUTH_VERSION}/authenticator_${AWS_IAM_AUTH_VERSION}_checksums.txt" \
&& cat authenticator_checksums.txt | grep "aws-iam-authenticator_${AWS_IAM_AUTH_VERSION}_linux_amd64" > authenticator_checksums_new.txt \
&& sha256sum -c authenticator_checksums_new.txt \
&& rm -f authenticator_checksums.txt authenticator_checksums_new.txt \
&& mv "aws-iam-authenticator_${AWS_IAM_AUTH_VERSION}_linux_amd64" /usr/local/bin/aws-iam-authenticator \
&& chmod +x /usr/local/bin/aws-iam-authenticator \
&& aws-iam-authenticator version
RUN apk -v --update --no-cache add \
python3 py3-pip aws-cli
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]