Azure Container Registry (ACR)
Â
Intro
A registry of Docker and Open Container Initiative (OCI) images, with support for all OCI artifacts
Documentation
Â
Tips and Tidbits
Like Docker Hub, Container Registry is organized around repositories that contain one or more images
You can sign images to increase trust and reduce the chances of an image becoming accidentally (or intentionally) corrupted or otherwise infected.
Before you can push an image to your registry, you must tag it with the fully qualified name of your registry login server.
The login server name is in the format <registry-name>.azurecr.io (must be all lowercase)
docker tag mcr.microsoft.com/hello-world mycontainerregistry.azurecr.io/hello-world:v1 docker push <login-server>/hello-world:v1
In addition to storing and hosting images, you can also use Container Registry to build images.
Instead of building an image yourself and pushing it to Container Registry, use the CLI to upload the Docker file and other files that make up your image.
Â
Tiers
Tier | Description |
---|---|
Basic | A cost-optimized entry point for developers learning about Azure Container Registry. Basic registries have the same programmatic capabilities as Standard and Premium (such as Azure Active Directory authentication integration, image deletion, and webhooks). However, the included storage and image throughput are most appropriate for lower usage scenarios. |
Standard | Standard registries offer the same capabilities as Basic, with increased included storage and image throughput. Standard registries should satisfy the needs of most production scenarios. |
Premium | Premium registries provide the highest amount of included storage and concurrent operations, enabling high-volume scenarios. In addition to higher image throughput, Premium adds features such as geo-replication for managing a single registry across multiple regions, content trust for image tag signing, private link with private endpoints to restrict access to the registry. |
Â
Â
Pricing
Â
Â
Explore elements of a Dockerfile
Â
Â
The following aspects of the image are defined:
The base or parent image we use to create the new image
Commands to update the base OS and install additional software
Build artifacts to include, such as a developed application
Services to expose, such a storage and network configuration
Command to run when the container is launched
Â
The ENTRYPOINT
in the file indicates which process will execute once we run a container from an image.
Â
Run the az acr build
command, which builds the image and, after the image is successfully built, pushes it to your registry
az acr build --image sample/hello-world:v1 \
--registry <myContainerRegistry> \
--file Dockerfile .
Â
Use the az acr repository list
command to list the repositories in your registry.
az acr repository list --name <myContainerRegistry> --output table