Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

GCloud CLI install failing because of Bad Gateway 502 error

Good afternoon,

I am trying to install the Gcloud CLI in the standard (public) Python 3.10-slim and 3.9-slim image from Dockerhub

When running the command as defined here :

 
RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && \
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | gpg --dearmor -o /usr/share/keyrings/cloud.google.gpg && apt-get --allow-releaseinfo-change update -y && \
apt-get install google-cloud-sdk -y
 
I get the following error:

502 Bad Gateway [IP: 108.177.127.138 80]
#4 7.764 Fetched 1712 B in 7s (230 B/s)
#4 7.764 Reading package lists...
#4 8.213 W: Failed to fetch http://packages.cloud.google.com/apt/dists/cloud-sdk/main/binary-all/Packages 502 Bad Gateway [IP: 108.177.127.138 80]
#4 8.213 W: Some index files failed to download. They have been ignored, or old ones used instead.
 
The above always used to work, but now it doesnt anymore.
Could it be that something has shifted around in the GCP package repo?
 
Many thanks in advance,

 

Solved Solved
4 10 2,358
1 ACCEPTED SOLUTION

This appears to be fixed for me now. 

View solution in original post

10 REPLIES 10