image

In this free lab we will get familair with docker and some of its basic commands

Create docker hub account. Docker Hub skip this step if you already have one

image

Open Play with Docker

image

login with your docker hub account.

image

Click on start

image

It will start a 4 hr session

image

click on + ADD NEW INSTANCE

image

Start a docker container

Click in terminal and press enter.

docker container run hello-world

image

Check docker running containers with

docker ps

image

docker run initialize process to build a container. It shows no container because this container has stopped running

Click in terminal and press enter.

Check size of image with

docker images

image

You can get more details on container with

Check size of image with

docker inspect <container name>

image

You can get more details on container with

You can get more details on image with

docker inspect <image name>

image

docker container 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 https://github.com/docker-library/hello-world 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

Delete all three nodes and close session

  1. click on first node and then DELETE
  2. Repeat same for second and third node
  3. click close session

image

Congratulations you have completed this lab

Let us know if you still have any question
Youtube video for this lab