Use git clone in Docker to report an error Could not resolve host:; Unknown error

created at 11-01-2021 views: 2

In the environment where docker is located, such as centos execute:

1. Modify resolv.conf

vim /etc/resolv.conf

Modify the original nameserver


2. Restart docker

service docker restart

Into the container:

Execute test

Please log in to leave a comment.