In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Most people do not understand the knowledge points of this article "how to install and configure Docker under CentOS7", so the editor summarizes the following contents, detailed contents, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "how to install and configure Docker under CentOS7" article.
1 install Docker
If so, uninstall the old Docker, otherwise it may not be compatible
[root@Docker] # yum remove-y docker docker-io docker-selinux python-docer-py
Install the Docker-CE Community version
[root@Docker] # yum-y install docker-ce
Start Docker
[root@Docker] # systemctl start docker [root@Docker] # systemctl enable dockerCreated symlink from / etc/systemd/system/multi-user.target.wants/docker.service to / usr/lib/systemd/system/docker.service. [root@Docker] # systemctl status docker ● docker.service-Docker Application Container Engine Loaded: loaded (/ usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled) Active: active (running) since Mon 2020-03-30 13:17:47 EDT 16s ago Docs: https://docs.docker.comMain PID: 12932 (dockerd) CGroup: / system.slice/docker.service └─ 12932 / usr/bin/dockerd-H fd://-- containerd=/run/contain...Mar 30 13:17:47 Docker dockerd [12932]: time= "2020-0...Mar 30 13:17:47 Docker dockerd [12932]: time=" 2020-0...Mar 30 13:17:47 Docker dockerd [12932]: time= " 2020-0...Mar 30 13:17:47 Docker dockerd [12932]: time= "2020-0...Mar 30 13:17:47 Docker dockerd [12932]: time=" 2020-0...Mar 30 13:17:47 Docker dockerd [12932]: time= "2020-0...Mar 30 13:17:47 Docker dockerd [12932]: time=" 2020-0...Mar 30 13:17:47 Docker dockerd [12932]: time= "2020-0...Mar 30 13:17:47 Docker dockerd [12932]: time= "2020-0...Mar 30 13:17:47 Docker systemd [1]: Started Docker A...Hint: Some lines were ellipsized Use-l to show in full. [root@Docker] # docker versionClient: Docker Engine-CommunityVersion: 19.03.8API version: 1.40Go version: go1.12.17Git commit: Wed Mar 11 01:27:04 2020OS/Arch: linux/amd64Experimental: falseServer: Docker Engine-CommunityEngine: Version: 19.03.8API version: 1.40 (minimum Version 1.12) Go version: go1.12.17 Git commit: afacb8b Built: Wed Mar 11 01:25:42 2020 OS/Arch: linux/amd64 Experimental: falsecontainerd: Version: 1.2.13 GitCommit: 7ad184331fa3e55e52b890ea95e65ba581ae3429runc: Version: 1.0.0-rc10 GitCommit: dc9208a3303feef5b3839f4323d9beb36df0a9dddocker-init: Version: 0.18.0 GitCommit: Fec36832 specifies the docker mirror accelerator (important Otherwise, downloading the docker image from abroad later will report an error directly, and the speed is slow)
Domestic docker warehouse acceleration site
Https://registry.docker-cn.comhttp://hub-mirror.c.163.comhttps://3laho3y3.mirror.aliyuncs.comhttp://f1361db2.m.daocloud.iohttps://mirror.ccs.tencentyun.comhttps://docker.mirrors.ustc.edu.cn http://dockerhub.azk8s.cn/ configuration acceleration node [root@Docker] # vim / etc/docker/daemon.json {"registry-mirrors": ["https://registry.docker-cn.com"]}
Watch out for invisible characters! Note: if you need to use your own local private warehouse, write as follows:
{"registry-mirrors": ["https://e9yneuymirror.aliyuncs.com"]" insecure-registries ": [" 192.168.10.7 insecure-registries 4000 "]}
Additional reference configurations:
{"insecure-registries": ["0.0.0.0Plus 0"], "log-opts": {"max-size": "20m" "max-file": "5"}} 3 restart related services [root@Docker] # systemctl daemon-reload [root@Docker] # systemctl restart docker & & systemctl status docker4 displays Docker system information [root@Docker] # docker infoClient: falseServer: Containers: 0 Running: 0 Paused: 0 Stopped: 0 Images: 0 Server Version: 19.03.8 Storage Driver: overlay2 Backing Filesystem: Supports d_type: true Native Overlay Diff: true Logging Driver: json-file Cgroup Driver: cgroupfs Plugins : Volume: local Network: bridge host ipvlan macvlan null overlay Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog Swarm: inactive Runtimes: runc Default Runtime: runc Init Binary: docker-init containerd version: 7ad184331fa3e55e52b890ea95e65ba581ae3429 runc version: dc9208a3303feef5b3839f4323d9beb36df0a9dd init version: fec3683 Security Options: seccomp Profile: default Kernel Version: 3.10.0-957.el7.x86_64 Operating System: CentOS Linux 7 (Core) OSType: linux Architecture: x86: 64 CPUs: 2 Total Memory: 7.62GiB Name: Docker ID: SZWH:KWZM:GDQA:ZRHY:PU7A : JV23:7TX3:SYUM:J3UX:ZEOR:JG44:SDHL Docker Root Dir: / var/lib/docker Debug Mode: false Registry: https://index.docker.io/v1/ Labels: Experimental: false Insecure Registries: 127.0.0.0 Live Restore Enabled 8 Registry Mirrors: https://registry.docker-cn.com Live Restore Enabled: falseWARNING: IPv4 forwarding is disabledWARNING: bridge-nf-call-iptables is disabledWARNING: bridge-nf-call-ip6tables is disabled5 Test pull Docker Image [root@Docker] # docker Image pull centos:latestlatest: Pulling from library/centos8a29a15cefae: Pull complete Digest: sha256:fe8d824220415eed5477b63addf40fb06c3b049404242b31982106ac204f6700Status: Downloaded newer image for centos:latestdocker.io/library/centos:latest# successfully fetched the Docker image [root@Docker] # docker imagesREPOSITORY TAG IMAGE ID CREATED SIZEcentos latest 470671670cac 2 months ago 237MB is the content of this article on "how to install and configure Docker under CentOS7" I believe we all have a certain understanding. I hope the content shared by the editor will be helpful to you. If you want to know more about the relevant knowledge, please pay attention to the industry information channel.
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.