Hello,
I'm trying to create a docker image which downloads the google-cloud-cli, so that it runs in an Airflow instance.
But when I reach the rows where we are going to download the cli:
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 | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -
RUN apt-get update && apt-get install -y gcc default-libmysqlclient-dev libpq-dev python3-dev gettext-base apt-transport-https ca-certificates gnupg google-cloud-cli build-essential
It states the error:
------
> [airflow-init 3/5] RUN apt-get update && apt-get install -y gcc default-libmysqlclient-dev libpq-dev python3-dev gettext-base apt-transport-https ca-certificates gnupg google-cloud-cli build-essential:
0.355 Get:1 http://deb.debian.org/debian bullseye InRelease [116 kB]
0.407 Get:2 http://deb.debian.org/debian-security bullseye-security InRelease [48.4 kB]
0.423 Get:3 http://deb.debian.org/debian bullseye-updates InRelease [44.1 kB]
0.488 Get:4 http://deb.debian.org/debian bullseye/main arm64 Packages [7957 kB]
0.791 Get:5 http://deb.debian.org/debian-security bullseye-security/main arm64 Packages [264 kB]
0.805 Get:6 http://deb.debian.org/debian bullseye-updates/main arm64 Packages [16.3 kB]
1.055 Get:7 https://apt.postgresql.org/pub/repos/apt bullseye-pgdg InRelease [123 kB]
1.087 Get:8 http://packages.cloud.google.com/apt cloud-sdk InRelease [1712 B]
1.169 Get:9 https://apt.postgresql.org/pub/repos/apt bullseye-pgdg/main arm64 Packages [299 kB]
1.179 Err:10 http://packages.cloud.google.com/apt cloud-sdk/main all Packages
1.179 502 Bad Gateway [IP: 142.250.179.174 80]
1.253 Err:11 http://packages.cloud.google.com/apt cloud-sdk/main arm64 Packages
1.253
1.413 Fetched 8870 kB in 1s (6815 kB/s)
1.413 Reading package lists...
1.625 W: Failed to fetch http://packages.cloud.google.com/apt/dists/cloud-sdk/main/binary-all/Packages 502 Bad Gateway [IP: 142.250.179.174 80]
1.625 W: Failed to fetch http://packages.cloud.google.com/apt/dists/cloud-sdk/main/binary-arm64/Packages
1.625 W: Some index files failed to download. They have been ignored, or old ones used instead.
1.630 Reading package lists...
1.855 Building dependency tree...
1.905 Reading state information...
1.946 E: Unable to locate package google-cloud-cli
------
This error started today, I was able to run the same dockerfile before with no problems.
What can I do to correct this?
Solved! Go to Solution.
The solution was changing
http://packages.cloud.google.com/apt
to
The solution was changing
http://packages.cloud.google.com/apt
to