Docker Note

Commands Practiced and their purpose.

Command: docker pull redis

Purpose: This downloads the official Redis Docker image from Docker Hub to my local machine. This image serves as the reusable template from which Redis containers can be created.

Command:docker images

Purpose: This lists all Docker images stored locally on my machine. This allows me to verify which images are available before creating or managing containers.

Screenshot 2026-07-24 144501.png

Command: docker ps

Purpose: This displays all currently running Docker containers. It provides useful runtime information such as the container ID, image, status, exposed ports, and assigned container name.

Command: docker run -d redis

Purpose: This creates and starts a new Redis container in detached mode, allowing it to run in the background while freeing up the terminal for additional commands.

Screenshot 2026-07-24 144537.png

Screenshot 2026-07-24 144729.png

Command: docker ps -a Purpose: This lists all Docker containers on the system, including both running and stopped containers. This provides a complete view of the container lifecycle.

Screenshot 2026-07-24 144931.png