第一次失敗安裝
[root@rosalie ~]# yum install docker
註:後發現此指令適用CentOS7
安裝好後測試出現錯誤訊息
[root@rosalie ~]# docker run centos:6.6 /bin/ps
Segmentation Fault or Critical Error encountered. Dumping core and aborting.
Aborted
確定有安裝但無法使用
[root@rosalie ~]# yum list installed |grep docker
docker.x86_64 1.5-5.el6 @epel
直接卸載
[root@rosalie ~]# yum -y remove docker.x86_64
第二次失敗安裝-沒任何事發生,又失敗
[root@rosalie ~]# yum install -y docker-io
..過程略
Error: Nothing to do
第三次安裝成功
先vi /etc/yum.repos.d/docker.repo
[root@rosalie ~]# vi /etc/yum.repos.d/docker.repo
直接I後加入如下内容:
[dockerrepo]
name=Docker Repository
baseurl=https://yum.dockerproject.org/repo/main/centos/$releasever/
enabled=1
gpgcheck=1
gpgkey=https://yum.dockerproject.org/gpg
然後再次安裝
[root@rosalie ~]# yum install docker-engine
啟動docker服務
[root@rosalie ~]# service docker start
出現
Starting cgconfig service: [ OK ]
Starting docker: [ OK ]
測試成功
[root@rosalie ~]# docker run centos:6.6 /bin/ps
Unable to find image 'centos:6.6' locally
6.6: Pulling from centos
3690474eb5b4: Pull complete
77a142d62b31: Pull complete
Digest: sha256:e1842923809c4d5ce7f4e2961c34982618439e6d23dc854328be213992d23b9d
Status: Downloaded newer image for centos:6.6
PID TTY TIME CMD
1 ? 00:00:00 ps
沒有留言:
張貼留言