Using Docker CLI to Interact with Docker Daemon

In this part of the course, the author demonstrates a simple interaction between the Docker client and the Docker Daemon. This involves using the Docker command line interface to run a sample container called Hello World. The process begins by downloading a Docker Image, then spinning up a container and showing how to interact with it.

To run the container, the Docker command Docker Run is used followed by the container name Hello-World. Prior to running the command, there were no containers or images on the local machine, as shown by running Docker PS and Docker Images.

The Docker client initially tries to find the image locally but since it is not available, it pulls the latest version of Hello-World from Docker Hub. The pull process is completed, and the image is now running locally. The container is then created and outputs the message 'Hello from Docker'. The steps involved in running the container are also displayed.

The author emphasizes that pulling the image separately using Docker Pull and then running the container using Docker Run is also possible, but when just using Docker Run without a local copy of the image, it will be automatically pulled. The commands Docker PS, Docker PS -A, and Docker Images can be used to view running containers, all containers (including stopped ones), and downloaded images respectively.

This part of the course serves as an introduction to simple interactions with the Docker Daemon. The author reassures that more in-depth concepts will be covered in the upcoming parts of the course and encourages learners to become comfortable with these basic interactions.

video txt