docker login -u {用户名} -p {密码} 127.0.0.1:80
WARNING! Using --password via the CLI is insecure. Use --password-stdin. Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.39/auth: dial unix /var/run/docker.sock: connect: permission denied
修改/etc/docker/daemon.json文件,如果没有就新建一个
{ "registry-mirrors": ["https://i22aew6l.mirror.aliyuncs.com"], "insecure-registries":["ip:port","ip:port"] }
修改完了以后重启服务
systemctl daemon-reload
systemctl restart docker