Container vs Image vs Registries

Phenny MwaisakaPhenny Mwaisaka
1 min read

In Docker, a container is a standalone, executable package of software that includes everything it needs to run, like code, runtime, system tools, libraries, and settings. An image is a template for creating a container, containing the necessary files and configurations. A registry is a service that stores and distributes Docker images.

Elaboration:

  • Containers:

    Think of containers as self-contained "boxes" that package an application and its dependencies. They isolate the application from the underlying host system, allowing it to run consistently across different environments.

  • Images:

    Images are the blueprints for creating containers. They are built from a Dockerfile, which defines the instructions for building the image.

  • Registries:

    Registries provide a way to share and access Docker images. They act as a central repository for storing and retrieving images. Examples include Docker Hub (a public registry) and private registries like Azure Container Registry or AWS ECR.

  • Relationship:

    You build an image from a Dockerfile, then you can use that image to create a container. To share or distribute your images, you push them to a registry. Others can then pull those images from the registry to create their own containers.

0
Subscribe to my newsletter

Read articles from Phenny Mwaisaka directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Phenny Mwaisaka
Phenny Mwaisaka