Dockerlab 101 Hello World

Step 0 : Create docker hub account.

Step 1 : Open Play with Docker or login in below with your docker hub account.

Step 2 : Click on start

Step 3 : It will start a 4 hr session, click on + ADD NEW INSTANCE

Step 4 : Click in terminal and press enter.

Step 5 : docker run hello-world

Bonus steps

  1. Check docker running containers with docker ps

  2. Check size of image with docker images

  3. You can get more details on container with docker inspect <container name>

  4. You can get more details on image with docker inspect <image name>


  • docker run initialize process to build a container.

  • docker run [OPTIONS] IMAGE[:TAG|@DIGEST] [COMMAND] [ARG...]

  • we have not given any options in this command.

  • image name is hello-world (This image is a prime example of using the scratch image effectively. See hello.c in for the source code of the hello binary included in this image.)

  • docker will check if image is available locally

  • if image is available locally it will start container using this image

  • if image is not available locally, it will download it from docker registry (docker hub is default registry) and start container using that image