Docker login 登录私服,报错; http: server gave HTTP response to HTTPS client

[root@kapana docker-compose]# docker login 192.168.10.223:5000
Username: admin
Password: 
Error response from daemon: Get "https://192.168.10.223:5000/v2/": http: server gave HTTP response to HTTPS client
  • 查看系统内是否存在 /etc/docker/daemon.json 文件
vim /etc/docker/daemon.json
  • 添加以下内容
"insecure-registries":["192.168.10.223:5000"]
  • 重启docker服务
[root@kapana docker-compose]# systemctl daemon-reload
[root@kapana docker-compose]# systemctl restart docker.service
  • 再登录私服
[root@kapana docker-compose]# docker login 192.168.10.223:5000
Username: admin
Password: 
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store

Login Succeeded

你可能感兴趣的:(错误集,环境搭建,Docker,docker,nexus)