Installing Docker CE on Centos 7

A nice little post detailing how to install Docker CE on a Centos 7 machine.


Step 1) In a terminal windows type the following command: sudo yum install -y yum-utils device-mapper-persistent-data lvm2





Step 2) You need to setup a stable repository with this command: sudo yum-config-manager –add-repo




Step 3) Install docker CE with this command: sudo yum install docker-ce

Step 3



Accept all the defaults (i.e. select y) while being promoted in step 3. After that, you should have a working copy of Docker CE installed.


Step 4) Start Docker with this command: sudo systemctl start docker


The next step is optional but it will mean you can run docker without typing sudo every time: sudo usermod -aG docker ricky < substitute my name for your username.


Now log out of Centos and log back in again… Its time to test it work… Open a terminal window again and lets download a container and run it by typing:  docker run hello-world

You should see a hello world message and some info…