DEV Community

Cover image for Day 2: Docker Installation & Hello World!
Jonas Scholz
Jonas Scholz Subscriber

Posted on • Originally published at adventofdocker.com

Day 2: Docker Installation & Hello World!

This is a crosspost from adventofdocker.com

Today we are going to start with the installation of Docker and run our first container! This blog post should take you about 10 minutes.

Docker is available for all major platforms, Windows, Mac, and Linux. It even works on Raspberry Pi! Here's an overview of the supported operating systems:

Platform x86_64 / amd64 arm64 / aarch64 arm (32-bit) ppc64le s390x
Debian
Fedora
Raspberry Pi OS
RHEL
SLES
Ubuntu
Binaries

The easiest way to get started is to download the Docker Desktop application from the official website. Docker Desktop includes everything you need to get started with Docker and even comes with a graphical user interface.

I can't explain it better than the official documentation, so please refer to the official documentation for installation instructions:

Once you have Docker Desktop installed, you can verify the installation by running the following command in your terminal:

docker info
Enter fullscreen mode Exit fullscreen mode

You should get a bunch of information about your Docker installation, this is how it looks on my machine:

docker info output

To make sure that the installation was successful, we are going to run our first container.

For that, again open your terminal and run the following command:

docker run hello-world
Enter fullscreen mode Exit fullscreen mode

docker run output

If you see the output above, your Docker installation was successful! 🎉

If not, please comment under this post or reach out to me via mail (jonas@sliplane.io) and I will help you out!

What's next?

Tomorrow we are going to learn how to build our first container! If you want to get a head start, run docker help and have a look at the different commands that Docker offers.

Until tomorrow, happy coding! 🚀

Jonas

Top comments (5)

Collapse
 
fazly_fathhy profile image
Fazly Fathhy

i create the image successfully, but when i run it, it's run and give the cotainer id, but when i type 'docker ps' it doesnt show in the table, why?

Collapse
 
xinitd profile image
Shakhzhakhan Maxudbek

Try docker ps -a

Collapse
 
code42cate profile image
Jonas Scholz

the container is exiting immediately (thats on purpose). docker ps only shows running containers, docker ps --all or docker ps -a shows all of them. Thats why you only see it with the all flag! You can see the documentation with docker ps --help, there you see the explanation:)

Collapse
 
userof profile image
Matthias Wiebe

Usually if i get chocolade-calendar - i'll open all doors in the same day :D

Collapse
 
fazly_fathhy profile image
Fazly Fathhy

i mean i can see that container in the 'docker ps -a' only