-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
41 lines (30 loc) · 1.13 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
# docker build --no-cache -t gcpsdk:latest .
# docker run -it --rm -v $PWD:/home/gcpuser/ESM-VFC-cloud-project gcpsdk:latest /bin/bash
FROM ubuntu:21.04
ARG DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe/Berlin
RUN apt update \
&& apt install --yes \
ca-certificates \
curl wget \
python3 \
git \
vim
ARG GCSDKVER=352.0.0
RUN wget https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-${GCSDKVER}-linux-x86_64.tar.gz \
&& tar xf google-cloud-sdk-${GCSDKVER}-linux-x86_64.tar.gz \
&& rm google-cloud-sdk-${GCSDKVER}-linux-x86_64.tar.gz
RUN /google-cloud-sdk/install.sh \
--command-completion true \
--path-update true \
--usage-reporting false \
--additional-components kubectl
RUN curl https://raw.githubusercontent.com/helm/helm/HEAD/scripts/get-helm-3 | bash
RUN useradd -g users -s /bin/bash --create-home gcpuser \
&& cp /root/.bashrc /home/gcpuser/.bashrc && chown gcpuser: /home/gcpuser/.bashrc
ARG TINI_VERSION=v0.19.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
RUN chmod +x /tini
USER gcpuser
WORKDIR /home/gcpuser
ENTRYPOINT ["/tini", "--"]