---
title:  "Docker CE install in CentOS 7"
date:   2017-11-24 18:37:00
categories: DOCKER
---

**uninstall old docker**

{% highlight c %}

$ sudo yum remove docker \
                  docker-common \
                  docker-selinux \
                  docker-engine

{% endhighlight %}


**Install using the repository**

{% highlight c %}

$ sudo yum install -y yum-utils \
  device-mapper-persistent-data \
  lvm2

$ sudo yum-config-manager \
    --add-repo \
    https://download.docker.com/linux/centos/docker-ce.repo

{% endhighlight %}


**Optional**

{% highlight c %}

$ sudo yum-config-manager --enable docker-ce-edge
$ sudo yum-config-manager --enable docker-ce-test
$ sudo yum-config-manager --disable docker-ce-edge

{% endhighlight %}

**INSTALL DOCKER CE**

{% highlight c %}

# yum install -y docker-ce-17.06.1.ce

{% endhighlight %}

**start docker**

{% highlight c %}

$ sudo systemctl start docker

{% endhighlight %}

**Verify**

{% highlight c %}

# sudo docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
9a0669468bf7: Pull complete
Digest: sha256:cf2f6d004a59f7c18ec89df311cf0f6a1c714ec924eebcbfdd759a669b90e711
Status: Downloaded newer image for hello-world:latest

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:

{% endhighlight %}

Install docker ce in centos 7
Install docker ce in centos 7
