This repository has been archived by the owner on Apr 16, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
54 lines (40 loc) · 1.75 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
FROM docker/compose:alpine-1.25.5 as compose
FROM alpine:3.11
ARG HELM_VERSION=3.2.0
ARG KUBECTL_VERSION=1.18.2
ARG AWS_IAM_AUTH_VERSION=0.5.0
ARG AWSCLI_VERSION=1.18.43
ARG DOCTL_VERSION=1.41.0
# default docker target assuming a docker:dind service is avaibable
ENV DOCKER_DRIVER "overlay2"
ENV DOCKER_HOST "tcp://docker:2375"
ENV DOCKER_TLS_CERTDIR ""
WORKDIR /tmp
RUN apk add --update --no-cache --virtual .build-deps curl ca-certificates
# Install docker
COPY --from=compose /usr/local/bin/docker /usr/local/bin/docker
# Install docker-compose
COPY --from=compose /usr/local/bin/docker-compose /usr/local/bin/docker-compose
# Install kubectl
RUN curl -L https://storage.googleapis.com/kubernetes-release/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl -o /usr/local/bin/kubectl && \
chmod +x /usr/local/bin/kubectl
# Install helm
RUN curl -L https://get.helm.sh/helm-v${HELM_VERSION}-linux-amd64.tar.gz | tar xz && \
mv linux-amd64/helm /usr/local/bin/helm && \
chmod +x /usr/local/bin/helm
# Install aws-iam-authenticator (latest version)
RUN curl -L https://github.com/kubernetes-sigs/aws-iam-authenticator/releases/download/v${AWS_IAM_AUTH_VERSION}/aws-iam-authenticator_${AWS_IAM_AUTH_VERSION}_linux_amd64 \
-o /usr/local/bin/aws-iam-authenticator && \
chmod +x /usr/local/bin/aws-iam-authenticator
# Install awscli
RUN apk add --update --no-cache python3 groff && \
pip3 install --upgrade pip && \
pip3 install awscli==${AWSCLI_VERSION}
# Install doctl
RUN curl -L https://github.com/digitalocean/doctl/releases/download/v${DOCTL_VERSION}/doctl-${DOCTL_VERSION}-linux-amd64.tar.gz | tar xz && \
mv doctl /usr/local/bin/doctl && \
chmod +x /usr/local/bin/doctl
# Cleanup
RUN apk del .build-deps && \
rm -rf /tmp/*
WORKDIR /app