21

I'm trying to install Docker on CentOS 6.6 64 bit version. When execute

sudo yum install docker

I get this

Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Loading mirror speeds from cached hostfile
  * base: mirrors.psychz.net
  * extras: centos-distro.cavecreek.net
  * updates: distro.ibiblio.org
No package docker available.
Error: Nothing to do
Etan Reisner
  • 77,877
  • 8
  • 106
  • 148
Iqbal
  • 590
  • 1
  • 4
  • 15

4 Answers4

26

Epel repository is not installed. Run

sudo yum install epel-release

and then run

sudo yum install docker-io
eebbesen
  • 5,070
  • 8
  • 48
  • 70
rjaiswal
  • 1,417
  • 1
  • 11
  • 6
  • 15
    This answer do longer appears to work (`Package epel-release-6-8.noarch already installed and latest version`; `No package docker-io available`). – Tim Malone Mar 06 '19 at 05:20
4

I found the answer here

I needed to add the EPEL repository where Docker can be found.

Iqbal
  • 590
  • 1
  • 4
  • 15
4

Log into your machine as a user with sudo or root privileges.

Make sure your existing yum packages are up-to-date.

$ sudo yum update

Run the Docker installation script.

$ curl -sSL https://get.docker.com/ | sh

This script adds the docker.repo repository and installs Docker. Start the Docker daemon.

$ sudo service docker start
Thomas Modeneis
  • 687
  • 8
  • 11
  • 1
    this is not working anymore for centos 6.6 # curl -sSL https://get.docker.com/ | sh # Executing docker install script, commit: f45d7c11389849ff46a6b4d94e0dd1ffebca32c1 ERROR: Unsupported distribution '' – Abhilash Mishra Feb 10 '20 at 07:20
3

If you are coming here for the same issue with RedHat, use

sudo yum install yum-utils
sudo yum-config-manager --enable rhui-REGION-rhel-server-extras
sudo yum install docker
mallet
  • 2,454
  • 3
  • 37
  • 64