一段时间以来,docker-io
软件包已用于在CentOS 6上安装Docker。
自本月初以来,该软件包似乎不再可用:
[root@e0-01.p:0 yum.repos.d]# yum install docker-io
Loaded plugins: fastestmirror, presto
Setting up Install Process
Determining fastest mirrors
* base: mirror.intergrid.com.au
* extras: mirror.ventraip.net.au
* updates: mirror.ventraip.net.au
base | 3.7 kB 00:00
base/primary_db | 4.7 MB 00:00
epel | 4.7 kB 00:00
epel/primary_db | 6.0 MB 00:00
extras | 3.4 kB 00:00
extras/primary_db | 28 kB 00:00
updates | 3.4 kB 00:00
updates/primary_db | 3.2 MB 00:00
No package docker-io available.
Error: Nothing to do
docker-io
以前是epel资源库的一部分,并且是推荐的在number of {{3}中在CentOS 6上安装Docker(尽管是旧版本)的方法。 }。
可以在CentOS 6上安装Docker吗?
答案 0 :(得分:5)
此版本终于安装好了
wget https://yum.dockerproject.org/repo/main/centos/6/Packages/docker-engine-1.7.1-1.el6.x86_64.rpm
sudo rpm -ivhf docker-engine-1.7.1-1.el6.x86_64.rpm
sudo service docker start
系统
Linux host.my-domain.com 2.6.32-431.17.1.el6.x86_64#1 SMP 5月7日星期三 23:32:49 UTC 2014 x86_64 x86_64 x86_64 GNU / Linux
答案 1 :(得分:2)
版本1.7.0 has a bug,阻止docker守护进程在CentOS 6.x上启动:
level=warning msg="Running modprobe bridge nf_nat failed with message: , error: exit status 1"
level=fatal msg="Error starting daemon: Error initializing network controller: Error creating default \"bridge\" network: operation not supported"
为了修复使用版本1.7.1:
yum install https://yum.dockerproject.org/repo/main/centos/6/Packages/docker-engine-1.7.1-1.el6.x86_64.rpm
答案 2 :(得分:1)
我不确定为什么docker-io
突然消失,但是可以通过Docker托管的rpm直接安装以前可以通过epel存储库获得的相同版本:
[root@server]# yum install
https://get.docker.com/rpm/1.7.0/centos-6/RPMS/x86_64/docker-engine-1.7.0-1.el6.x86_64.rpm
[root@server]# docker --version
Docker version 1.7.0, build 0baf609
答案 3 :(得分:0)
您应该从epel-release安装docker-engine:
更新,安装epel存储库,然后创建一个名为docker.repo的存储库,并填写有关docker repo的信息:
[user@docker7 ~]# sudo yum update -y
[user@docker7 ~]# sudo yum install epel-release
[user@docker7 ~]# sudo vi /etc/yum.repos.d/docker.repo
[docker-repo]
name=Docker Repo
baseurl=https://yum.dockerproject.org/repo/main/centos/$releasever/
enabled=1
gpgcheck=1
gpgkey=https://yum.dockerproject.org/gpg
现在安装docker-engine并启用docker以systemctl在启动时启动。然后启用docker命令并通过systemctl启动docker
For centos 7
[user@docker7 ~]$ sudo yum install -y docker-engine
[user@docker7 ~]$ sudo systemctl enable docker
[user@docker7 ~]$ sudo systemctl start docker
[user@docker7 ~]$ sudo systemctl status docker
For centos 6
[user@docker7 ~]$ sudo chkconfig docker on
[user@docker7 ~]$ sudo service docker start
[user@docker7 ~]$ sudo service docker status
[user@docker7 ~]$ ps aux | grep docker
root 2382 0.3 1.4 498424 26536 ? Ssl 20:17 0:00 /usr/bin/dockerd
root 2385 0.0 0.2 263104 5568 ? Ssl 20:17 0:00 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-containerd-shim --runtime docker-runc
答案 4 :(得分:0)
CentOS 6 的最新 docker 引擎版本为 1.7.1,可用 URL 为 https://get.docker.com/rpm/1.7.1/centos-6/RPMS/x86_64/docker-engine-1.7.1-1.el6.x86_64.rpm。不幸的是,这个 rpm 文件现在不能通过“yum install”命令安装。下载文件后可以使用“rpm”命令。
docker-engine 需要 Libcgroup,可以从 https://vault.centos.org 找到。
wget https://vault.centos.org/6.6/os/x86_64/Packages/libcgroup-0.40.rc1-12.el6.x86_64.rpm
sudo rpm -ivhf libcgroup-0.40.rc1-12.el6.x86_64.rpm
wget https://get.docker.com/rpm/1.7.1/centos-6/RPMS/x86_64/docker-engine-1.7.1-1.el6.x86_64.rpm
sudo rpm -ivhf docker-engine-1.7.1-1.el6.x86_64.rpm
sudo service docker start
答案 5 :(得分:0)
可以使用这个网址https://mirrors.tuna.tsinghua.edu.cn/docker/yum/repo/centos6/Packages/ 并选择docker-engine rpm x86-64版本下载
然后,您可以这样做:
sudo yum install localinstall docker-engine-1.7.1-1.el6.x86_64.rpm