Help Needed: Docker can't connect to internet even with --net=host

I have 2 VMs on which I’m running the same Docker image. On the x86_64 VM, the Docker image runs as normally and is able to connect to the internet. On the arm64 VM, the Docker image is not able to connect to the internet. The VM host itself, however, can connect just fine.

I’ve compared /etc/resolve.conf files, and those are the same on both the VMs and on the images. I’ve compared the Docker network bridges, and those are the same. I’ve compared IPtables on the hosts and those are the same.

Even if I launch a container with --net=host on the arm64 VM, it cannot resolve its own name servers. What could be the issue here?

VMs don’t run Docker containers, they run an operating system.

So there are many layers that can break the Internet connectivity.

You need to provide more information. Which OS, how did you install Docker, any firewall, etc.

The x86_64 VM on which the Docker image runs successfully:

$ cat /etc/os-release
NAME=“CentOS Linux”
VERSION=“7 (Core)”

The arm64 VM on which the Docker image does not run successfully:

$ cat /etc/os-release
NAME=“Rocky Linux”
VERSION=“8.7 (Green Obsidian)”

Docker was installed through the yum package manager. There is no firewall, but there is a corporate VPN. The resolve.conf accounts for this, though.