在这里插入代码片
# Descripción del problema
Después de instalar Docker, pruebe si la instalación es exitosa. Ejecutar docker run hello-world informa el siguiente error:
# docker run hello-world
Unable to find image 'hello-world:latest' locally
docker: Error response from daemon: Get https://registry-1.docker.io/v2/: x509: certificate is valid for www.doctorcom.com, not registry-1.docker.io.
See 'docker run --help'.
Solución
- Cambie la imagen doméstica de Alibaba Cloud y cree un archivo daemon.json
vim /etc/docker/daemon.json
Agregue lo siguiente al archivo:
{
"registry-mirrors": ["https://alzgoonw.mirror.aliyuncs.com"]
}
- reiniciar ventana acoplable
systemctl restart docker
systemctl status docker
- Vuelva a ejecutar
docker run hello-world
para extraer la imagen nuevamente, ¡y finalmente lo logró! ¡dormir!