Azure Container and Container Registry
Container Group
A container group is a collection of containers that get scheduled on the same host machine. The containers in a container group share a lifecycle, resources, local network, and storage volumes. It's similar in concept to a pod in Kubernetes
https://learn.microsoft.com/en-us/azure/container-instances/container-instances-container-groups?source=recommendations#what-is-a-container-group
Storage
Supported volumes include:
Azure file share
Using an Azure file share with Azure Container Instances provides file-sharing features similar to using an Azure file share with Azure virtual machines
Azure Files shares can only be mounted to Linux containers
Requires the Linux container run as root
Volume mounts are limited to CIFS support
Mounting an Azure Files share to a container instance is similar to a Docker bind mount. If you mount a share into a container directory in which files or directories exist, the mount obscures files or directories, making them inaccessible while the container runs.
Secret
To supply sensitive information to the containers in a container group
Once deployed with secrets in a container group, a secret volume is read-only
All secret volumes are backed by tmpfs, a RAM-backed filesystem; their contents are never written to non-volatile storage.
Secret volumes are currently restricted to Linux containers. (9/04/2023)
Empty directory (emptyDir)
provide writeable directory accessible to each container in a container group.
data is persisted through container crashes. However, containers that are restarted are not guaranteed to persist the data in an emptyDir volume. If container gropu is stopped, the emptyDir volume is not persisted.
Cloned git repo
Mounts a directory and clones the specified Git repository into it at container startup, which avoid adding the code in the applications.
Mounting a gitRepo volume is currently restricted to Linux containers. (09/04/2023)
Examples
Create Azure Files Share volume and Mount
Create Container and Mount Azure File Share Volume using YAML Template
YAML Template file
Create Container and Mount volume
Create Container and Mount Azure File Share Volume using Resource Manager Template
Template file
Deploy Container using template file
Create and access Secret volume
Mount Secret Volume with YAML Template
YAML Template
Deploy container with YAML template
Mount Secret Volume using Resource Manager
Mount emptyDir volume using Resource Manager
Create and access gitRepo volume
Mount gitRepo Volume using Resource Manager
ACR Role-based Access Control
https://docs.microsoft.com/en-us/azure/container-registry/container-registry-roles?tabs=azure-cli
Container Networking
https://docs.microsoft.com/en-us/azure/virtual-network/container-networking-overview
Reference
Empty Dir Volume: https://learn.microsoft.com/en-us/azure/container-instances/container-instances-volume-emptydir
Secret volume: https://learn.microsoft.com/en-us/azure/container-instances/container-instances-volume-secret
gitRepo volume: https://learn.microsoft.com/en-us/azure/container-instances/container-instances-volume-gitrepo
Last updated