-
Notifications
You must be signed in to change notification settings - Fork 79
/
Copy path.gitpod.Dockerfile
59 lines (48 loc) · 2.53 KB
/
.gitpod.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
FROM gitpod/workspace-full
USER root
### cloud_sql_proxy ###
ARG CLOUD_SQL_PROXY=/usr/local/bin/cloud_sql_proxy
RUN curl -fsSL https://dl.google.com/cloudsql/cloud_sql_proxy.linux.amd64 > $CLOUD_SQL_PROXY \
&& chmod +x $CLOUD_SQL_PROXY
### Docker client ###
RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - \
# 'cosmic' not supported
&& add-apt-repository -yu "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable" \
&& apt-get install -yq docker-ce-cli=5:18.09.0~3-0~ubuntu-bionic \
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/*
### Helm ###
RUN curl -fsSL https://get.helm.sh/helm-v3.0.1-linux-amd64.tar.gz \
| tar -xzvC /usr/local/bin --strip-components=1 \
&& helm completion bash > /usr/share/bash-completion/completions/helm
### kubernetes ###
RUN mkdir -p /usr/local/kubernetes/ && \
curl -fsSL https://github.com/kubernetes/kubernetes/releases/download/v1.16.2/kubernetes.tar.gz \
| tar -xzvC /usr/local/kubernetes/ --strip-components=1 && \
KUBERNETES_SKIP_CONFIRM=true /usr/local/kubernetes/cluster/get-kube-binaries.sh && \
chown gitpod:gitpod -R /usr/local/kubernetes
ENV PATH=$PATH:/usr/local/kubernetes/cluster/:/usr/local/kubernetes/client/bin/
RUN curl -o /usr/bin/kubectx https://raw.githubusercontent.com/ahmetb/kubectx/master/kubectx && chmod +x /usr/bin/kubectx \
&& curl -o /usr/bin/kubens https://raw.githubusercontent.com/ahmetb/kubectx/master/kubens && chmod +x /usr/bin/kubens
### MySQL client ###
RUN apt-get update && apt-get install -yq \
mysql-client \
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/*
# yq - jq for YAML files
RUN cd /usr/bin && curl -L https://github.com/mikefarah/yq/releases/download/2.4.0/yq_linux_amd64 > yq && chmod +x yq
### Certbot
RUN apt-get update \
&& apt-get install -yq certbot python3-certbot-dns-google \
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/*
USER gitpod
### Google Cloud ###
# not installed via repository as then 'docker-credential-gcr' is not available
ARG GCS_DIR=/opt/google-cloud-sdk
ENV PATH=$GCS_DIR/bin:$PATH
RUN sudo chown gitpod: /opt \
&& mkdir $GCS_DIR \
&& curl -fsSL https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-245.0.0-linux-x86_64.tar.gz \
| tar -xzvC /opt \
&& /opt/google-cloud-sdk/install.sh --quiet --usage-reporting=false --bash-completion=true \
--additional-components docker-credential-gcr alpha beta \
# needed for access to our private registries
&& docker-credential-gcr configure-docker