# Create a Linux container with Docker

In 
Published 2022-12-03

If you want to create a Docker container on which you want to deploy something, you need to have a Docker image (if you don't have it already).

I will use docker images command in order to see if I have a centos image on my host computer:

I see that I don't have any centos image on my host computer (where I have installed Docker software).

In this case I can download and install a CentOS image from Docker Hub Repository , using the following Docker command:

docker run -it centos /bin/bash

When the command completes, you have the access to the new container which is running. You can see that the new container acts as a new machine: it has a new IP, a new name, and you can type Linux (CentOS) commands.

At the host operating system, you can type the docker images again in order to see that the new images in the local repository:

At this point you have a Docker container running a CentOS machine.