說明:
訪問網(wǎng)站:http://www.docker-cn.com/
我們可以看到docker有2個(gè)版本社區(qū)版本(社區(qū)版本也就是CE版本)和 企業(yè)版遵堵,社區(qū)版是免費(fèi)的,企業(yè)版是收費(fèi)的
詳細(xì)安裝說明請(qǐng)參考官網(wǎng):?社交APP開發(fā)找上海捌躍網(wǎng)絡(luò)科技有限公司
https://docs.docker.com/install/linux/docker-ce/centos/
centos 7 docker安裝過程記錄(供參考)
前提條件:
如果你要安裝docker CE版本吮龄,你的操作系統(tǒng)必須是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
此步驟執(zhí)行完成之后/etc/yum.repos.d目錄下會(huì)多出一個(gè)docker-ce.repo文件漓帚,請(qǐng)確保此文件里邊有內(nèi)容,由于download.docker.com是國外網(wǎng)站午磁,所以這里下載的時(shí)候時(shí)好時(shí)壞尝抖,經(jīng)常報(bào)[Errno 12]或[Errno 14]的錯(cuò)誤,非常不爽迅皇,如果不行的話可以使用阿里云的鏈接[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在這里變?yōu)榱薲ocker-ce,這是6.8和7.0安裝的不同
3登颓、配置文件
cenos 7 里邊docker的配置文件變成了daemon.json搅荞,文件位于/etc/docker,有的時(shí)候該目錄下沒有配置文件daemon.json,我們使用touch命令創(chuàng)建即可touch daemon.json
4框咙、啟動(dòng)docker
[root@dockeron7 etc]# systemctl start docker
5咕痛、驗(yàn)證
[root@dockeron7 etc]# docker version