Docker container can reach DNS but not resolve hosts
You could install tools like dig
inside the docker image to alanyse the issue.
use static hosts in your /etc/hosts
file te make apt-get run inside the docker image. add these lines to your hosts file:
213.32.5.7 debian.mirrors.ovh.net141.76.2.4 ftp.de.debian.org 217.196.149.233 mirror-conova-security.debian.org212.211.132.250 lobos.debian.org212.211.132.250 security.debian.org 5.153.231.4 http.debian.net 151.101.12.204 cdn-fastly.deb.debian.org151.101.12.204 security-cdn.debian.org