Docker build failing on private hosted agent (Azure DevOps)

Viewed 2124

I am trying to build a dockerfile on a private-hosted Azure DevOps agent, which is behind a corporate proxy. The base image is python/3.8.3-slim-buster. When I run apt-get update I get the following errors:

Err:1 http://deb.debian.org/debian buster InRelease
  470  status code 470 [IP: 151.101.36.204 80]
Err:2 http://security.debian.org/debian-security buster/updates InRelease
  470  status code 470 [IP: 151.101.36.204 80]
Err:3 http://deb.debian.org/debian buster-updates InRelease
  470  status code 470 [IP: 151.101.36.204 80]
Reading package lists...
E: The repository 'http://deb.debian.org/debian buster InRelease' is not signed.
E: Failed to fetch http://deb.debian.org/debian/dists/buster/InRelease  470  status code 470 [IP: 151.101.36.204 80]
E: Failed to fetch http://security.debian.org/debian-security/dists/buster/updates/InRelease  470  status code 470 [IP: 151.101.36.204 80]
E: The repository 'http://security.debian.org/debian-security buster/updates InRelease' is not signed.
E: Failed to fetch http://deb.debian.org/debian/dists/buster-updates/InRelease  470  status code 470 [IP: 151.101.36.204 80]
E: The repository 'http://deb.debian.org/debian buster-updates InRelease' is not signed.

Now the tricky part is that if I log in to this agent manually, and give the docker build command there it works fine. Also building on a Microsoft hosted agent works fine.

I pass the proxy configuration with --build-arg flags to the Dockerfile.

Anyone any idea where the error could be?

Edit: I tried adding the "--allow-releaseinfo-change" flag, still the same error. I have the feeling it somehow proxy related but can't figure out where to start looking.

1 Answers
Related