A Docker image is like a recipe or blueprint. It contains all the files and instructions needed to create a container. Containers are created from images.
docker images?The docker images command lists all Docker images stored locally, showing details like repository name, tag, image ID, creation date, and size.
First, you write a Dockerfile to define the image (3). Then you build or pull the image (1). Next, you run a container from that image (2). Finally, you verify the container is running (4).
If an image lacks a command or entrypoint, the container has nothing to run and will stop immediately after starting.
Keeping images small helps containers start quickly and reduces storage and network use, making deployments efficient.
