安装yum-utils软件包是为了提供一个yum-config-manager单位,同时安装的device-mapper-persistent-data和lvm2用于存储设备映射必需的两个软件包。
3、配置不变的存储库 [root@docker ~]# yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo 已加载插件:fastestmirror, langpacks adding repo from: https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo grabbing file https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo to /etc/yum.repos.d/docker-ce.repo repo saved to /etc/yum.repos.d/docker-ce.repo [root@docker ~]# ls /etc/yum.repos.d/ #查察是否插手了一个docker源 CentOS-Base.repo CentOS-Debuginfo.repo CentOS-Media.repo CentOS-Vault.repo CentOS-CR.repo CentOS-fasttrack.repo CentOS-Sources.repo docker-ce.repo 4、安装docker引擎 [root@docker ~]# yum install -y docker-ce ... 已安装: docker-ce.x86_64 3:19.03.8-3.el7 作为依赖被安装: container-selinux.noarch 2:2.107-3.el7 containerd.io.x86_64 0:1.2.13-3.1.el7 docker-ce-cli.x86_64 1:19.03.8-3.el7 完毕! 5、建设docker目次,设置镜像加快处事 [root@docker ~]# mkdir /etc/docker -p [root@docker ~]# tee /etc/docker/daemon.json <<-'EOF' > { > "registry-mirrors": ["https://5m9y9qbl.mirror.aliyuncs.com"] > } > EOF { "registry-mirrors": ["https://5m9y9qbl.mirror.aliyuncs.com"] }说明:tee呼吁——从尺度输入写往文件和尺度输出,即把尺度输入的数据复制到每一个文件FILE, 同时送往尺度输出。
6、开启处事,查察版本
[root@docker ~]# systemctl daemon-reload [root@docker ~]# systemctl restart docker.service [root@docker ~]# docker -v Docker version 19.03.8, build afacb8b [root@docker ~]# docker version Client: Docker Engine - Community Version: 19.03.8 API version: 1.40 Go version: go1.12.17 Git commit: afacb8b Built: Wed Mar 11 01:27:04 2020 OS/Arch: linux/amd64 Experimental: false Server: Docker Engine - Community Engine: Version: 19.03.8 API 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: false containerd: Version: 1.2.13 GitCommit: 7ad184331fa3e55e52b890ea95e65ba581ae3429 runc: Version: 1.0.0-rc10 GitCommit: dc9208a3303feef5b3839f4323d9beb36df0a9dd docker-init: Version: 0.18.0 GitCommit: fec3683 总结 本文主要先容了docker的浸染,将之与传统虚拟机举办特性比拟,以及架构层面的比拟,接着报告有关docker的焦点三大构成,最终给出基于Linux下Centos7操纵系统中docker的安装流程。
Linux公社的RSS地点:https://www.linuxidc.com/rssFeed.aspx