1. 程式人生 > >3、docker安裝 on centos 7(64bit)

3、docker安裝 on centos 7(64bit)

err ext manager 阿裏雲 完成 data 64bit and lvm

說明:
訪問網站:http://www.docker-cn.com/
我們可以看到docker有2個版本社區版本(社區版本也就是CE版本)和 企業版,社區版是免費的,企業版是收費的
技術分享圖片

詳細安裝說明請參考官網:
https://docs.docker.com/install/linux/docker-ce/centos/

centos 7 docker安裝過程記錄(供參考)
前提條件:
如果你要安裝docker CE版本,你的操作系統必須是Centos 7以上,否則你的部分功能不支持

1、Set up the repository
1.1
Install required packages. yum-utils provides the yum-config-manager utility, and device-mapper-persistent-data and lvm2 are required by the devicemapper storage driver.

[root@dokceron70 ~]# yum install -y yum-utils device-mapper-persistent-data lvm2
1.2
Use the following command to set up the stable repository. You always need the stable repository, even if you want to install builds from the edge or test repositories as well.
[root@dokceron70 ~]# yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
此步驟執行完成之後/etc/yum.repos.d目錄下會多出一個docker-ce.repo文件,請確保此文件裏邊有內容,由於download.docker.com是國外網站,所以這裏下載的時候時好時壞,經常報[Errno 12]或[Errno 14]的錯誤,非常不爽,如果不行的話可以使用阿裏雲的鏈接[root@localhost yum.repos.d]# yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

2、安裝docker-CE版本
[root@dokceron70 ~]# yum -y install docker-ce

在6.8版本的docker-io在這裏變為了docker-ce,這是6.8和7.0安裝的不同

3、配置文件
cenos 7 裏邊docker的配置文件變成了daemon.json,文件位於/etc/docker,有的時候該目錄下沒有配置文件daemon.json,我們使用touch命令創建即可touch daemon.json

4、啟動docker
[root@dockeron7 etc]# systemctl start docker

5、驗證
[root@dockeron7 etc]# docker version
技術分享圖片

3、docker安裝 on centos 7(64bit)