– Azure Container Instances is a solution for running Docker containers on-demand in a managed, serverless Azure environment. It’s suitable for quickly deploy and operating in isolated containers, without orchestration. Containers offer significant startup benefits over virtual machines (VMs). Azure Container Instances can start containers in Azure in seconds, without the need to provision and manage VMs.

– Azure Container Instances enables exposing your container groups directly to the internet with an IP address and a fully qualified domain name (FQDN) (specify a custom DNS name label when creating instance). Azure Container Instances provides optimum utilization by allowing exact specifications of CPU cores and memory. You pay based on what you need

– Azure Container Registry is a managed, private Docker registry service based on the open-source Docker Registry 2.0. Create and maintain Azure container registries to store and manage your private Docker container images and related artifacts.

Example: Building simple django image and publishing to Azure Container Registry. After that deploy this image by Azure Container Instance

1/Creating Django Application:

– Creating django project

– Edit setting for allow all host access app: Edit file myapp01/myapp01/

– Try running public this app with port 80

– Browssing app

2/Bulding Django Image:

– Prepare Docker file

FROM alpine

LABEL maintainer=””

RUN apk add –update python3 py-pip

RUN pip install –upgrade pip setuptools

RUN pip install –upgrade django

COPY . /

WORKDIR /myapp01

ENTRYPOINT [“python3″,””,”runserver”,”″]


– Building new image

3/Create Azure Container Registry And Push Image:

– Install Azure CLI on Docker host using this guide:

– Sign in with Azure CLI using command az login

– Create a private container registry using the Azure CLI

# az acr create –resource-group <rs name> –name <registry-name> –sku Basic

– – 

– Log in to registry

# az acr login –name <registry -name>

– Tag image and push to login server

– Check image already push to registry on Azure Portal

4/Crete new Azure Container Instance Using Image From This Registry:

– Access app using Container Instance FQDN

Tags : AutomationContainerDevOpsK8sKubernetesLinux-Unix

Leave a Response

error: Content is protected !!