docker container cant connect to internet on vm

On one of my three servers (centos7) docker containers show a weird behaviour. After downloading the image the docker container is not able to download packages from the internet.
The only difference between the server with the errors and the other ones is that the server with errors is setup as a vm while the other ones are dedicated.

I first tried to run the docker compose tutorial (https://docs.docker.com/compose/gettingstarted/) but while creating the service the container couldnt fetch the website to download the package.

RUN apk add --no-cache gcc musl-dev linux-headers
 ---> Running in c2bbe974f34b
fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/main/x86_64/APKINDEX.tar.gz

At this step the process got stuck and i cancelled the process.
To test the network connectivity i used busyboxes next.
First i pinged google on each server, which worked on all three.

sudo docker run --rm -i  busybox ping www.google.de

PING www.google.de (216.58.213.227): 56 data bytes
64 bytes from 216.58.213.227: seq=0 ttl=115 time=7.437 ms
64 bytes from 216.58.213.227: seq=1 ttl=115 time=7.275 ms
64 bytes from 216.58.213.227: seq=2 ttl=115 time=7.315 ms

An nslookup on the other hand didnt work on the server with the connection issues. On the other servers it worked as expected.

sudo docker run --rm -i  busybox nslookup www.google.de

Server:         172.17.0.7
Address:        172.17.0.7:53

Non-authoritative answer:
Name:   www.google.de
Address: 216.58.213.227

*** Can't find www.google.de: No answer

I already read on other posts that i should check differences in the /etc/resolv.conf file on container and host, which is not the case. Another suggestion was reseting the docker networks to initialize them again, which had the same results. I checked the Docker logs but couldnt find anything that looks like an error or warning.
It cant be a firewallD problem cause i deactivated the firewall.
If i run containers with –network host everything works as expected…

Does anyone have suggestions what i can do next to understand this issue? I would really really appreciate it 🙂

Source: Docker Questions