

To list all containers, Type: docker ps -a Conclusion To list running containers on CentOS Docker engine, Type: docker ps docker exec -ti docker-httpd /bin/bash List Containers on CentOS 7 We can get an interactive shell session to the container using the 'docker exec' command. I also mapped host port 80 to the port 80 of the new container. docker run -d -name docker-httpd -p 80:80 httpd:latestĪs per the above example, I started a new container called docker-httpd using the httpd image. Then, Start a new Docker Container with the 'docker run' command. Package version: docker-1.12.x86_64Ĭreate your first docker container on CentOS 7įor this example, I will run the Apache HTTPD Web Server on CentOS Docker Engine.įirst, Download the latest Apache httpd image using the 'docker pull' command. You should see the output something like the following: Client: To verify CentOS 7 Docker Installation, Type: docker version To install docker, Open the terminal and type: yum install docker docker-registryĪfter the installation is finished, start the docker service and enable to start docker automatically when system reboot. In this section, you’ll be installing the latest version of Docker from the official Docker repository.We will install the docker engine available from the CentOS Base repository.

The official CentOS 7 repository may not have the latest installation package for Docker. Step 1: Setting up Docker on CentOS 7 Instance This tutorial will demonstrate how you can set up and use Docker on CentOS 7 in a few simple steps.Īll the commands you execute throughout this tutorial are run as a non-root user and if necessary root access will be provided using the sudo keyword. The most popular and easy way to install Docker on the existing operating system is by using yum commands. There are various ways to install Docker on Linux distributions. Containers are very similar to virtual machines, but they are more portable, efficient, and easy to use. It provides a way to separate your applications from your infrastructure. Docker is a platform that makes running and managing application processes in containers easier.
