For some time, the docker-io
package has been used to install Docker on CentOS 6.
Since early this month, this package no longer appears to be available:
[[email protected]: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
was previously part of the epel repository and has been the recommended way to install Docker (albeit, an older version) on CentOS 6 in a number of places.
Is there any other way Docker can be installed on CentOS 6?
OS requirementsTo install Docker Engine, you need a maintained version of CentOS 7, CentOS 8 (stream), or CentOS 9 (stream). Archived versions aren't supported or tested.
Rootless mode allows running the Docker daemon and containers as a non-root user to mitigate potential vulnerabilities in the daemon and the container runtime. Rootless mode does not require root privileges even during the installation of the Docker daemon, as long as the prerequisites are met.
Docker-Ce is a community edition of Docker, while Docker.Io is the enterprise edition. Docker-Ce is free and open source, while Docker.Io is available under a subscription. Docker-Ce is ideal for development and testing, while Docker.Io is better suited for production environments.
I'm not sure why docker-io
suddenly disappeared, but the same version previously available through the epel repository can be installed directly from this rpm hosted by Docker:
[root@server]# yum install
https://get.docker.com/rpm/1.7.1/centos-6/RPMS/x86_64/docker-engine-1.7.1-1.el6.x86_64.rpm
[root@server]# docker --version
Docker version 1.7.0, build 0baf609
You should install docker-engine from epel-release:
Update, install epel repo then create a repo called docker.repo and fill in the information for 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
Now install docker-engine and enable docker to start at boot with systemctl. Then enable docker command and also start docker with systemctl start 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
3.Manage Docker as a non-root user
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With