Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

So bloated #297

Open
twocs opened this issue Dec 1, 2022 · 5 comments
Open

So bloated #297

twocs opened this issue Dec 1, 2022 · 5 comments

Comments

@twocs
Copy link

twocs commented Dec 1, 2022

I literally only want to use gcloud auth with a service account that can push to a bucket. Yet the smallest image available is over 200MB. Please make images that give gcloud auth and absolutely nothing else.

@Wallman
Copy link

Wallman commented Dec 7, 2023

Agree, size is an issue! We are facing long CI pipelines because of this

@nroose
Copy link

nroose commented Dec 30, 2023

Seems clear that Google needs the money that they charge us for downloading the additional size. Just really atrocious.

@anindyatahsin
Copy link
Contributor

anindyatahsin commented Jun 21, 2024

A new version of docker image (use tag :stable-alpha) with a much smaller footprint is now available for testing. Please feel free to test the image out and provide feedback as appropriate.

To pull the new image use:
docker pull gcr.io/google.com/cloudsdktool/google-cloud-cli:stable-alpha

@nroose
Copy link

nroose commented Jun 24, 2024

I am trying to figure out how to try this. We currently mostly use other images and install gcloud sometimes on those images, to use things like docker and use gcloud for auth and configure docker. Is there some way to do the install that is also smaller? Thank you!

@twocs
Copy link
Author

twocs commented Jun 25, 2024

I am trying to figure out how to try this. We currently mostly use other images and install gcloud sometimes on those images, to use things like docker and use gcloud for auth and configure docker. Is there some way to do the install that is also smaller? Thank you!

If you want to continue to use other images and install gcloud, it might be useful to look at their Dockerfile, which is here for stable-alpha:
https://github.com/GoogleCloudPlatform/cloud-sdk-docker/blob/master/stable/Dockerfile

For some of the Dockerfile (e.g. Google AppEngine Base) https://github.com/GoogleCloudPlatform/cloud-sdk-docker/blob/master/google_appengine_base/Dockerfile) they do this step, which seems fairly efficient:

RUN wget https://dl.google.com/dl/cloudsdk/channels/rapid/google-cloud-sdk.zip && unzip google-cloud-sdk.zip && rm google-cloud-sdk.zip

Alternately, for some tasks we are able to skip the Gcloud image. For example, to push an image to GCP, since docker has login:

            - echo ${GCLOUD_API_KEYFILE} | base64 -d > /tmp/gcloud-api-key.json
            - cat /tmp/gcloud-api-key.json | docker login -u _json_key --password-stdin https://gcr.io
            - docker image push $IMAGE_NAME

We are still using the cloud SDK for authenticated actions with kubectl. Would really love a Docker image or other method that allows the authenticated actions with kubectl without any other portion of the Google Cloud SDK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants