forked from GoogleCloudPlatform/cloud-sdk-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
48 lines (47 loc) · 2.35 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
FROM docker:27.2.1 as static-docker-source
FROM debian:bullseye
ARG CLOUD_SDK_VERSION
ENV CLOUD_SDK_VERSION=$CLOUD_SDK_VERSION
COPY --from=static-docker-source /usr/local/bin/docker /usr/local/bin/docker
COPY --from=static-docker-source /usr/local/libexec/docker/cli-plugins/docker-buildx /usr/local/libexec/docker/cli-plugins/docker-buildx
RUN groupadd -r -g 1000 cloudsdk && \
useradd -r -u 1000 -m -s /bin/bash -g cloudsdk cloudsdk
RUN apt-get update -qqy && apt-get -qqy upgrade && apt-get install -qqy \
curl \
python3-dev \
python3-crcmod \
apt-transport-https \
lsb-release \
openssh-client \
git \
make \
gnupg && \
export CLOUD_SDK_REPO="cloud-sdk-$(lsb_release -c -s)" && \
echo "deb https://packages.cloud.google.com/apt $CLOUD_SDK_REPO main" > /etc/apt/sources.list.d/google-cloud-sdk.list && \
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - && \
apt-get update && \
apt-get install -y google-cloud-cli=${CLOUD_SDK_VERSION}-0 \
google-cloud-cli-app-engine-python=${CLOUD_SDK_VERSION}-0 \
google-cloud-cli-app-engine-python-extras=${CLOUD_SDK_VERSION}-0 \
google-cloud-cli-app-engine-java=${CLOUD_SDK_VERSION}-0 \
google-cloud-cli-app-engine-go=${CLOUD_SDK_VERSION}-0 \
google-cloud-cli-datastore-emulator=${CLOUD_SDK_VERSION}-0 \
google-cloud-cli-pubsub-emulator=${CLOUD_SDK_VERSION}-0 \
google-cloud-cli-bigtable-emulator=${CLOUD_SDK_VERSION}-0 \
google-cloud-cli-firestore-emulator=${CLOUD_SDK_VERSION}-0 \
google-cloud-cli-spanner-emulator=${CLOUD_SDK_VERSION}-0 \
google-cloud-cli-cbt=${CLOUD_SDK_VERSION}-0 \
google-cloud-cli-kpt=${CLOUD_SDK_VERSION}-0 \
google-cloud-cli-local-extract=${CLOUD_SDK_VERSION}-0 \
google-cloud-cli-gke-gcloud-auth-plugin=${CLOUD_SDK_VERSION}-0 \
kubectl && \
gcloud config set core/disable_usage_reporting true && \
gcloud config set component_manager/disable_update_check true && \
gcloud config set metrics/environment docker_image_latest && \
gcloud --version && \
docker --version && kubectl version --client
RUN apt-get install -qqy \
gcc \
python3-pip
RUN git config --system credential.'https://source.developers.google.com'.helper gcloud.sh
VOLUME ["/root/.config", "/root/.kube"]