harbor Restart the operation after modifying the configuration file

  • 2021-09-12 02:35:30
  • OfStack

I won't talk too much, let's just look at the code ~


# docker-compose down
# ./prepare
# docker-compose up  In fact, in fact, the d

Supplementary knowledge: After installing Harbor, docker connects to the local warehouse to report an error

After installing Harbor, docker connects with local warehouse to report error.


[root@master1 v2]# docker login dsp.images.hub:11180
Username: admin
Password:
Error response from daemon: Get https://node4:11180/v1/users/: http: server gave HTTP response to HTTPS client

vim/usr/lib/systemd/system/docker. service is required


[Unit]
Description=Docker Application Container Engine
Documentation=https://docs.docker.com
After=network.target firewalld.service
 
[Service]
Type=notify
# the default is not to use systemd for cgroups because the delegate issues still
# exists and systemd currently does not support the cgroup feature set required
# for containers run by docker
ExecStart=/usr/bin/dockerd --insecure-registry=heheda.images.hub:11180
ExecReload=/bin/kill -s HUP $MAINPID
# Having non-zero Limit*s causes performance problems due to accounting overhead
# in the kernel. We recommend using cgroups to do container-local accounting.
LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
# Uncomment TasksMax if your systemd version supports it.
# Only systemd 226 and above support this version.
#TasksMax=infinity
TimeoutStartSec=0
# set delegate yes so that systemd does not reset the cgroups of docker containers
Delegate=yes
# kill only the docker process, not all processes in the cgroup
KillMode=process
 
[Install]
WantedBy=multi-user.target

Then restart docker

systemctl daemon-reload

systemctl restart docker

Also, remember to configure the mapping of hosts for dsp. images. hub.

docker v18:

{"data-root":"/data/docker","insecure-registries":["11.68.0.0/16","heheda.images.hub:11180"],"registry-mirrors":["http://mirror.kce.sdns.ksyun.com"]}


Related articles: