关于使用KubeSphere中的docker配置Harbor仓库http访问docker login登陆报错的解决办法

# 先进入harbor目录中,停止harbor
docker-compose down -v
# 然后修改docker相关文件
# 第一种方式:修改/etc/docker/daemon.json

{
   "insecure-registries": ["192.168.75.100:10000"]
}

# 第二种方式:修改/usr/lib/systemd/system/docker.service 
#ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
ExecStart=/usr/bin/dockerd  --insecure-registry 192.168.75.100:10000 -H fd:// --containerd=/run/containerd/containerd.sock

# 个人比较倾向于采用第一种方式

# 最后再启动harbor
docker-compose up -d

# 查看harbor服务启动情况
#  只有服务状态都是Up (healthy)才行

cd /usr/local/harbor/
docker-compose ps
      Name                     Command                  State                                      Ports                               
---------------------------------------------------------------------------------------------------------------------------------------
chartmuseum         /docker-entrypoint.sh            Up (healthy)   9999/tcp                                                           
clair               /docker-entrypoint.sh            Up (healthy)   6060/tcp, 6061/tcp                                                 
harbor-core         /harbor/harbor_core              Up (healthy)                                                                      
harbor-db           /docker-entrypoint.sh            Up (healthy)   5432/tcp                                                           
harbor-jobservice   /harbor/harbor_jobservice  ...   Up (healthy)                                                                      
harbor-log          /bin/sh -c /usr/local/bin/ ...   Up (healthy)   127.0.0.1:1514->10514/tcp                                          
harbor-portal       nginx -g daemon off;             Up (healthy)   8080/tcp                                                           
nginx               nginx -g daemon off;             Up (healthy)   0.0.0.0:4443->4443/tcp, 0.0.0.0:80->8080/tcp, 0.0.0.0:443->8443/tcp
notary-server       /bin/sh -c migrate-patch - ...   Up                                                                                
notary-signer       /bin/sh -c migrate-patch - ...   Up                                                                                
redis               redis-server /etc/redis.conf     Up (healthy)   6379/tcp                                                           
registry            /entrypoint.sh /etc/regist ...   Up (healthy)   5000/tcp                                                           
registryctl         /harbor/start.sh                 Up (healthy)          

如有状态不对的,关闭重启harbor或者重启主机等
上一篇:mac mysql error You must reset your password using ALTER USER statement before executing this statement.


下一篇:kubernetes之健康状态检测