Docker的卸載、更新(Rad Hat Linux)

首先查詢Linux內核版本命令:

命令:[root@bogon ~]# cat/proc/version

運行結果:

Linux version 3.10.0-327.13.1.el7.x86_64([email protected]) (gcc version 4.8.3 20140911 (Red Hat 4.8.3-9)(GCC) ) #1 SMP Thu Mar 31 16:04:38 UTC 2016

由此可以瞭解到,使用的環境是:Rad Hat Linux,應該使用yum命令

1)  查詢docker list

命令:[root@bogon ~]# yumlist installed |grep docker

運行結果:

docker-engine.x86_64                   1.11.1-1.el7.centos             @docker-main-repo

docker-engine-selinux.noarch           1.11.1-1.el7.centos             @docker-main-repo

2)  卸載

命令:

[root@bogon ~]# yum remove -y docker-engine.x86_64

[root@bogon ~]# yum remove -y docker-engine-selinux.noarch

3)  在線更新最新版本

curl –sslhttps://get.docker.com/ | sh 

4)  啓動docker

Servicedocker start

5)  啓動時啓用服務

systemctl enable docker

6)  檢查服務

Systemctl statusdocker

測試部分截圖如下:

wKiom1d-A02yzFNrAAM4UvqP-lE907.png-wh_50

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章