-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
67 lines (57 loc) · 1.81 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
###################################
# Google Cloud Project SDK Docker #
###################################
# Python 3
FROM python:3.10.0-buster
# File Author / Maintainer
MAINTAINER Eddie Belter <[email protected]>
# Args
ARG username=ebelter
# Deps
RUN apt update && \
apt install -y --no-install-recommends \
apt-transport-https \
ca-certificates \
gcc \
libnss-sss \
less \
python-dev \
python-setuptools \
sudo \
tmux \
vim && \
apt-get clean
# GCP SDK DPKG
RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
RUN curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -
# GCP SDK & Components
RUN sudo apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
kubectl \
google-cloud-sdk \
google-cloud-sdk-app-engine-grpc \
google-cloud-sdk-pubsub-emulator \
google-cloud-sdk-app-engine-go \
google-cloud-sdk-datastore-emulator \
google-cloud-sdk-app-engine-python \
google-cloud-sdk-cbt \
google-cloud-sdk-bigtable-emulator \
google-cloud-sdk-app-engine-python-extras \
google-cloud-sdk-datalab \
google-cloud-sdk-app-engine-java
# CRC
RUN pip uninstall --yes crcmod && \
pip install --no-cache-dir -U crcmod
# Me! or You!
COPY homedir /home/${username}
RUN rm -rf /home/${username}/.git /home/${username}/.gitignore
RUN useradd -Ms /bin/bash ${username} -G staff && \
mkdir /home/${username}/tmp/ && \
chown -R ${username} /home/${username}/ && \
chgrp -R ${username} /home/${username}/
RUN echo "${username} ALL=(ALL:ALL) NOPASSWD: ALL" | sudo EDITOR='tee -a' visudo
USER ${username}
WORKDIR /home/${username}
ENV HOME /home/${username}
# Default Command
CMD [ /bin/bash ]