Skip to content

Instantly share code, notes, and snippets.

@swarupdonepudi
Last active March 29, 2017 05:18
Show Gist options
  • Save swarupdonepudi/953d9f4f1b92548ebe90cf8cd68051e1 to your computer and use it in GitHub Desktop.
Save swarupdonepudi/953d9f4f1b92548ebe90cf8cd68051e1 to your computer and use it in GitHub Desktop.
Install steps for docker on CentoOS 7.2

Before Docker 1.12 was made generally available Docker 1.12 was not available as an yum package. So we had to install it form the binaries. You can find the instructions to install docker 1.12 using the source code below in this document. However it is easy to install docker 1.12 on CentOS 7 using the yum package manager.

Note : Without adding the docker repo to the default repos on CentOS docker 1.9 or lower version will be installed.

Steps to install docker 1.12 using yum package manager:

Note: You need to have sudo privileges to run the below commands

  1. Add a new yum repo to the existing repos. Create a new yum repo file : /etc/yum.repos.d/docker.repo with the below contents.
$ sudo vim /etc/yum.repos.d/docker.repo
[dockerrepo]
name=Docker Repository
baseurl=https://yum.dockerproject.org/repo/main/centos/7/
enabled=1
gpgcheck=1
gpgkey=https://yum.dockerproject.org/gpg
  1. Update repositories
$ sudo yum -y update
  1. Install docker engine
$ sudo yum -y install docker-engine

Docker 1.12 should be installed on your local machine. Run the below command to check the version of Docker running on your machine.

$ docker version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment