Installing Docker

30 minutes
  • 6 Learning Objectives

About this Hands-on Lab

In this hands-on lab, we will practice installing Docker.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Verify the Package Installation
  1. Verify that the packages yum-utils, device-mapper-persistent-data, and lvm2 are installed.
    sudo yum install -y yum-utils device-mapper-persistent-data lvm2
Add the Repository
  1. Add the Docker repository to your server.
    sudo yum-config-manager --add-repo
Install Docker
  1. Install Docker CE on your server.
    sudo yum install docker-ce
Enable and Start Docker
  1. Enable and start Docker on the server.
    sudo systemctl enable docker 
    sudo systemctl start docker
Add a User to the Docker Group
  1. Add your current user to the Docker group.
    sudo usermod -a -G docker cloud_user  
  2. Log out and back in to put the changes into effect.
Create Your First Container
  1. Create your first container using the hello-world image.
    sudo docker run hello-world

Additional Resources

Your development team has asked for a cloud server with Docker installed. To meet this requirement, you need to configure the Docker repository in your environment and create a new container called Hello World using the Centos:6 images.

Reminder: cat /etc/os-release will tell you the host operating system. Also, please wait an extra minute before connecting via ssh to make sure the lab is fully provisioned.

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?