Docker 安装 For CentOS 7.4
                                                            生活随笔
收集整理的這篇文章主要介紹了
                                Docker 安装 For CentOS 7.4
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.                        
                                安裝前提條件:
CentOS 版本 7.x,本例中使用CentOS 7.4
?
1.安裝yum-utils (yum-utils提供yum-config-manager工具包等)
# yum install -y yum-utils \device-mapper-persistent-data \lvm2
2.添加docker yum源
# yum-config-manager \--add-repo \https://download.docker.com/linux/centos/docker-ce.repo
3.列出歷史可安裝版本的docker
[root@test yum.repos.d]# yum list docker-ce --showduplicates | sort -r* updates: mirrors.tuna.tsinghua.edu.cn Loaded plugins: fastestmirror Installed Packages* extras: mirrors.tuna.tsinghua.edu.cn* epel: mirrors.tuna.tsinghua.edu.cn docker-ce.x86_64 18.03.0.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 17.12.1.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 17.12.0.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 17.09.1.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 17.09.0.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 17.09.0.ce-1.el7.centos @docker-ce-stable docker-ce.x86_64 17.06.2.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 17.06.1.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 17.06.0.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 17.03.2.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 17.03.1.ce-1.el7.centos docker-ce-stable docker-ce.x86_64 17.03.0.ce-1.el7.centos docker-ce-stable Determining fastest mirrors* base: mirrors.tuna.tsinghua.edu.cn Available Packages?
4.安裝指定版本的docker
[root@test yum.repos.d]# yum install docker-ce-17.09.0.ce-1.el7.centos
5.啟動(dòng)docker服務(wù)
#systemctl start docker #systemctl status docker --查看docker運(yùn)行狀態(tài)● docker.service - Docker Application Container EngineLoaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)Active: active (running) since Thu 2018-04-12 14:40:25 CST; 3 weeks 0 days agoDocs: https://docs.docker.comMain PID: 879 (dockerd)Memory: 28.7MCGroup: /system.slice/docker.service├─879 /usr/bin/dockerd└─967 docker-containerd -l unix:///var/run/docker/libcontainerd/docker-containerd.sock --metrics-interval=0 --start-timeout 2m --state-dir /var/run/docker/libcontainerd/containerd --shim docker...Apr 12 14:40:24 test dockerd[879]: time="2018-04-12T14:40:24.772795499+08:00" level=info msg="[graphdriver] using prior storage driver: overlay" Apr 12 14:40:24 test dockerd[879]: time="2018-04-12T14:40:24.985105572+08:00" level=info msg="Graph migration to content-addressability took 0.00 seconds" Apr 12 14:40:24 test dockerd[879]: time="2018-04-12T14:40:24.989165246+08:00" level=info msg="Loading containers: start." Apr 12 14:40:25 test dockerd[879]: time="2018-04-12T14:40:25.635272236+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" Apr 12 14:40:25 test dockerd[879]: time="2018-04-12T14:40:25.688855850+08:00" level=info msg="Loading containers: done." Apr 12 14:40:25 test dockerd[879]: time="2018-04-12T14:40:25.792474284+08:00" level=info msg="Docker daemon" commit=afdb6d4 graphdriver(s)=overlay version=17.09.0-ce Apr 12 14:40:25 test dockerd[879]: time="2018-04-12T14:40:25.807625596+08:00" level=info msg="Daemon has completed initialization" Apr 12 14:40:25 test dockerd[879]: time="2018-04-12T14:40:25.859396502+08:00" level=info msg="API listen on /var/run/docker.sock" Apr 12 14:40:25 test systemd[1]: Started Docker Application Container Engine. Apr 23 10:23:25 test dockerd[879]: time="2018-04-23T10:23:25.951186829+08:00" level=error msg="Error setting up exec command in container tomcat_01: Container b165437998d2ac8ff3c7246b10f417...is not running" Hint: Some lines were ellipsized, use -l to show in full.?
6.docker數(shù)據(jù)默認(rèn)存儲(chǔ)路徑在/var/lib/docker
?
7.設(shè)置docker服務(wù)開機(jī)啟動(dòng)
#systemctl enable docker?
轉(zhuǎn)載于:https://www.cnblogs.com/dinglin1/p/8989324.html
總結(jié)
以上是生活随笔為你收集整理的Docker 安装 For CentOS 7.4的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
 
                            
                        - 上一篇: jquery中ajax格式
- 下一篇: Android手机中怎么样在没root的
