CentOS 7安装Docker服务详细过程

2020-06-17 06:59:35易采站长站整理

         完全虚拟化。虚拟机模拟完整的底层硬件环境和特权指令的执行过程,客户操作系统无需进行修改。例如VMware Workstation,VirtulBox,QEMU等
         硬件辅助虚拟化。利用硬件辅助支持处理敏感指令来实现完全虚拟化的功能,客户端操作系统无需更改,例如Xen,KVM等
         部分虚拟化。只针对部分硬件资源进行虚拟化,客户端操作系统需要进行更改。
         超虚拟化。部分硬件接口以软件的形式提供给客户机操作系统,客户机操作系统需要进行更改。
         操作系统级虚拟化。内核通过创建多个虚拟的操作系统实例来隔离不同的进程,Docker技术。

Docker 安装

安装Docker是操作系统级虚拟化工具,它可以在Containers中自动部署应用程序
安装docker


[root@linuxprobe~]# yum -y install docker
[root@linuxprobe~]# systemctl start docker
[root@linuxprobe~]# systemctl enable docker
[root@linuxprobe ~]# systemctl status docker # 查看docker状态
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
Active: active (running) since Wed 2016-10-26 19:38:40 CST; 12s ago
Docs: http://docs.docker.com
Main PID: 3762 (docker-current)
CGroup: /system.slice/docker.service
└─3762 /usr/bin/docker-current daemon --exec-opt native.cgroupdriver=systemd --selinux-enabled --log-driver=journald

Oct 26 19:38:39 linuxprobe.org docker-current[3762]: time="2016-10-26T19:38:39.844803185+08:00" level=info msg="devmapper: Successfully created filesystem xfs on device docker-253:0-104354176-base"
Oct 26 19:38:39 linuxprobe.org docker-current[3762]: time="2016-10-26T19:38:39.994708787+08:00" level=info msg="Graph migration to content-addressability took 0.00 seconds"
Oct 26 19:38:40 linuxprobe.org docker-current[3762]: time="2016-10-26T19:38:40.018129400+08:00" level=info msg="Firewalld running: true"
Oct 26 19:38:40 linuxprobe.org docker-current[3762]: time="2016-10-26T19:38:40.294869786+08:00" level=info msg="Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can ...red IP address"
Oct 26 19:38:40 linuxprobe.org docker-current[3762]: time="2016-10-26T19:38:40.567994904+08:00" level=info msg="Loading containers: start."
Oct 26 19:38:40 linuxprobe.org docker-current[3762]: time="2016-10-26T19:38:40.568039413+08:00" level=info msg="Loading containers: done."
Oct 26 19:38:40 linuxprobe.org docker-current[3762]: time="2016-10-26T19:38:40.568047306+08:00" level=info msg="Daemon has completed initialization"