Unable to pull docker image

I’m running centos vm but have been having the error:

“Error response from daemon: Get “https://registry-1.docker.io/v2/”: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)”

I have tried modifying my dns by modifying /etc/resolve.conf to,, (IP address of my router), (IP address of my vm)

But none of the above remediation seems to work. Thanks in advance