Continuing to our series Docker for Beginners, In the previous post we’ve seen What is Docker and its related terminologies, How one can get started with Docker. In this post we will be seeing how to pull existing docker image run container and get inside the same.
So, let’s started.
First we will see how to run a Docker Container, Here we will run hello-world container, Let us understand what it will do,
docker container run hello-world
When we do Docker container run hello-world, it will look for the image locally, when it finds the image is not available locally which is docker host it downloads from the registry or server.
Whatever you see on your terminal is your docker client, docker host is installed on your system when you install docker.
So when we run above command we get below ouput.

Similarly let’s run redis container inside our docker but here we will run container in detach mode, that is it won’t stick to terminal.
docker container run -d detach
Your container is up and running and you get container id.
Now check the container is really running or not.
docker container ls
Now we will see to get inside the running container and how to start container in interactive mode.
To start a container in interactive mode.
docker container run -it ubuntu

you can get inside the container.
Now we will see how to get inside running container,
Run the redis container in detach mode.
docker container run -d redis
This will run the container in detach mode, now check the container with,
docker container ls
Now use below command to get inside the running redis container.
docker exec -it <container|_id/name>bash
Heavy breathing that’s lot of command to get started, But 1 milestone is achieved. Let me know if you have any queries.