In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article introduces the relevant knowledge of "how to configure the Docker accelerator". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Prepare in advance
Environmental preparation
1 virtual machine for 2C8G
OS:ubuntu14.04+ or centos7+ docker:1.12.6
* * OS configuration * *
Configure the hosts file between the nodes, turn off the firewall & SeLinux
If it is a cloned host, please check to see if there is a folder called / var/lib/rancher/state/. If so, delete it.
If you have previously installed kubernetes through Rancher, execute the command:
Docker rm-f-v $(docker ps-aq) 2. Docker volume rm $(docker volume ls) 3. Rm-rf / var/etcd/
Docker Accelerator configuration
There are two ways for docker to add registry-mirrors acceleration addresses:
1. Add: in daemon.json:
The default json path is / etc/docker/daemon.json (linux)% programdata%\ docker\ config\ daemon.json (windows)
Under linux, open the file with vim editor to add:
1. "registry-mirrors": ["https://7bezldxe.mirror.aliyuncs.com"]"
The added daemon.json file should look like this * (remember the English comma at the end of the penultimate line and the quotation marks around the string):
1. {2. "insecure-registries": ["10.66.21.90 registry-mirrors 5000"], 3. "registry-mirrors": ["https://um1k3l1w.mirror.aliyuncs.com"]4.}"
Finally, execute:
1. Systemctl daemon-reload & & systemctl restart docker
2. Add through the service file:
When you check the status through systemctl status docker, you will see a service file loaded as follows:
1. Root@node0:~# systemctl status docker2. ● docker.service-Docker Application Container Engine3. Loaded: loaded (/ lib/systemd/system/docker.service; enabled; vendor preset: enabled) 4. Active: active (running) since Sat 2017-05-13 06:28:01 PDT; 22h ago5. Docs: https://docs.docker.com
Ubuntu default path is / lib/systemd/system/docker.service,centos default path: / usr/lib/systemd/system/docker.service
Open the docker.service file with vim, find the line ExecStart=/usr/bin/dockerd, and add-registry-mirror= https://7bezldxe.mirror.aliyuncs.com at the end
1. # exists and systemd currently does not support the cgroup feature set required2. # for containers run by docker3. ExecStart=/usr/bin/dockerd-- registry-mirror= https://7bezldxe.mirror.aliyuncs.com4. ExecReload=/bin/kill-s HUP $MAINPID5. # Having non-zero Limit*s causes performance problems due to accounting overhead6. # in the kernel. We recommend using cgroups to do container-local accounting.
Finally, execute:
1. Systemctl daemon-reload & & systemctl restart docker
Both of the above methods can configure Registry Mirrors and execute the ps-ef | grep docker command to query the following information:
1. [root@master ~] # ps-ef | grep docker2. Root 4158 March 30-03:08:17 / usr/bin/dockerd-- registry-mirror= https://7bezldxe.mirror.aliyuncs.com-- insecure-registry=192.168.100.194:803. Root 4165 4158 March 30-00:17:44 docker-containerd- l unix:///var/run/docker/libcontainerd/docker-containerd.sock-- shim docker-containerd-shim-- metrics-interval=0-- start-timeout 2m-- state-dir / var/run/docker/libcontainerd/containerd-- runtime docker-runc "how to configure the Docker Accelerator" ends here. Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.