1,docker搭建无验证docker仓库,push时一直报错:http: server gave HTTP response to HTTPS client
这个问题可能是由于客户端采用https,docker registry未采用https服务所致。一种处理方式是把客户对地址“ip:5000”请求改为http。
引用:https://www.bbsmax.com/A/A7zg22MVd4/
之前一直把registry的daemon.json里面加上了"insecure-registries": [“ip:5000”],发现一直不管用,后来看到上面的文章,试着把客户端的deamon.json也改了试试,发现管用,至于registry配置的daemon.json也没有管它。客户端的daemon.json内容为
{
“exec-opts”: [“native.cgroupdriver=systemd”],
“registry-mirrors”: [“xxx”],
“insecure-registries”: [“ip:5000”]
}
2,docker容器设置开机自启动后怎么关闭
可以修改容器重启策略
参考:https://www.cnblogs.com/lonelyxmas/p/10382559.html