The existing Dockerfile for this repo uses a base from appengine:
FROM gcr.io/google_appengine/base
Propose updating the base image to Alpine and also documenting SDK install Dockerfiles for centos/ubuntu
The changes would
- Reduce the footprint by not including appengine-specific dependencies from the existing base
- Reduce the footprint by not install all gcloud subcomponents. Instead users can extend the basic source.
- Preserve the existing volume mounts
NOTE: This image is also built automatically on push to dockerhub:
Anyone automatically downloading that image will see a new base and lack of post-base install gcloud components.
The image based on google_appengine/base will no longer get updated as latest but would remain static at the version the time of switch over is done to tag: google/cloud-sdk:appengine
Sample alpine based Dockerfile
FROM alpine
RUN apk add --update curl python bash && rm -rf /var/cache/apk/*
ENV HOME /
RUN curl https://sdk.cloud.google.com | bash
ENV PATH /google-cloud-sdk/bin:$PATH
VOLUME ["/.config"]
CMD ["/bin/bash"]
For comparison of baseline alpine, ubuntu, centos vs pre-packaged image based on appengine:
REPOSITORY TAG IMAGE ID CREATED SIZE
google/cloud-sdk latest a1e753da8f5b 3 weeks ago 1.143 GB
salrashid123/cloud-sdk-docker alpine cc66a1c1e5c4 2 weeks ago 235.5 MB
salrashid123/cloud-sdk-docker centos 99f52928e785 2 weeks ago 411.8 MB
salrashid123/cloud-sdk-docker ubuntu ae332b8fe5d2 2 weeks ago 383.7 MB
The generated images for SDK 147 taken from here
I'll file a PR to update the Dockerfile in this repo to Alpine (thereby also trigger dockerhub rebuild) as well as document the centos/ubuntu Dockerfiles. Will submit PR on 5/15
Pls chime in if there are objections.
The existing Dockerfile for this repo uses a base from appengine:
Propose updating the base image to Alpine and also documenting SDK install Dockerfiles for centos/ubuntu
The changes would
Anyone automatically downloading that image will see a new base and lack of post-base install gcloud components.
The image based on google_appengine/base will no longer get updated as latest but would remain static at the version the time of switch over is done to tag: google/cloud-sdk:appengine
Sample alpine based Dockerfile
For comparison of baseline alpine, ubuntu, centos vs pre-packaged image based on appengine:
The generated images for SDK 147 taken from here
I'll file a PR to update the Dockerfile in this repo to Alpine (thereby also trigger dockerhub rebuild) as well as document the centos/ubuntu Dockerfiles. Will submit PR on 5/15
Pls chime in if there are objections.