Problems installing packages from debian.org in docker using Gitlab.com runner

In my ci jobs runner failed to do apt-get install with base Docker image python:3.9 (link to job log in private repo)

Dockerfile looks like so:

# snip
FROM python:3.9
ENV PYTHONUNBUFFERED 1
RUN mkdir /app
WORKDIR /app
RUN apt-get update && \
    apt-get install -y locales && \
    apt-get install -y python-dev libldap2-dev libsasl2-dev libssl-dev && \
    echo ru_RU.UTF-8 UTF-8 >> /etc/locale.gen && \
    locale-gen
# snip

These deb packages are used for using i18n in django. There was no problem several mouths before and on my local machine it also builds docker image. But now it replies with such messages:

Step 13/24 : RUN apt-get update &&     apt-get install -y locales &&     apt-get install -y python-dev libldap2-dev libsasl2-dev libssl-dev &&     echo ru_RU.UTF-8 UTF-8 >> /etc/locale.gen &&     locale-gen
 ---> Running in 1a127ea63619
Get:1 http://security.debian.org/debian-security bullseye-security InRelease [44.1 kB]
Get:2 http://security.debian.org/debian-security bullseye-security/main amd64 Packages [41.0 kB]
Get:3 http://deb.debian.org/debian bullseye InRelease [113 kB]
Get:4 http://deb.debian.org/debian bullseye-updates InRelease [39.4 kB]
Get:5 http://deb.debian.org/debian bullseye/main amd64 Packages [8178 kB]
Get:6 http://deb.debian.org/debian bullseye-updates/main amd64 Packages [2088 B]
Fetched 8417 kB in 32s (266 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  libc-l10n
The following NEW packages will be installed:
  libc-l10n locales
0 upgraded, 2 newly installed, 0 to remove and 1 not upgraded.
Need to get 4947 kB of archives.
After this operation, 20.9 MB of additional disk space will be used.
Get:1 http://deb.debian.org/debian bullseye/main amd64 libc-l10n all 2.31-13 [862 kB]
Err:1 http://deb.debian.org/debian bullseye/main amd64 libc-l10n all 2.31-13
  Connection timed out [IP: 151.101.202.132 80]
Get:2 http://deb.debian.org/debian bullseye/main amd64 locales all 2.31-13 [4085 kB]
Err:2 http://deb.debian.org/debian bullseye/main amd64 locales all 2.31-13
  Connection timed out [IP: 151.101.202.132 80]
E: Failed to fetch http://deb.debian.org/debian/pool/main/g/glibc/libc-l10n_2.31-13_all.deb  Connection timed out [IP: 151.101.202.132 80]
E: Failed to fetch http://deb.debian.org/debian/pool/main/g/glibc/locales_2.31-13_all.deb  Connection timed out [IP: 151.101.202.132 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
The command '/bin/sh -c apt-get update &&     apt-get install -y locales &&     apt-get install -y python-dev libldap2-dev libsasl2-dev libssl-dev &&     echo ru_RU.UTF-8 UTF-8 >> /etc/locale.gen &&     locale-gen' returned a non-zero code: 100
Cleaning up project directory and file based variables 00:02
ERROR: Job failed: exit code 100

For now I have workaround: I’ve built python image with packages installed on my machine, pushed it to the registry and used as base image. But there would be problem with other projects not in mine.

We’re also seeing builds failing trying to pull debian stuff (that works when downloading locally).

See 2021-09-26: Intermittent networking issues with some shared runner jobs (#5590) · Issues · GitLab.com / GitLab Infrastructure Team / production · GitLab

1 Like

See also: Google Cloud Status Dashboard