DEV Community


Discussion on: A beginner’s guide to Docker — how to create your first Docker application

gaelthomas profile image
Gaël Thomas Author

Indeed, the image is what we create in the tutorial with the following command:
docker build -t python-test .

To make a small reminder, docker build allow you to create an image from a Dockerfile. When you pass the '-t' parameter, you can define a name to your image (here the name of your image is 'python-test').

Concerning containers, consider each time you run a Docker, you create a container. In this tutorial, when you did the command docker run python-test, you created a container configured with the 'python-test' image.

If you want to make a test, you can type the following command to display all containers (docker you already launched):

docker ps -a

Note: There are many possible actions with the containers. It is possible to restart them so as not to recreate them every time, etc. However, to get started, it's not necessary to know all that! (this will be the opportunity to make another guide)

I hope my answer has enlightened you!

oscardom profile image

Now it's clear. Thanks for clarifying! :)