Radhika

AZURE CONTAINER INSTANCES (ACI)

Step-by-Step Guide to Deploy Azure Container Instances (ACI) πŸš€

Azure Container Instances (ACI) allows you to run containers without managing servers. It’s a quick and easy way to deploy Docker containers in the cloud.


πŸ› οΈ Step 1: Sign in to Azure Portal

  1. Go to Azure Portal.
  2. Sign in with your Microsoft Azure account.

πŸ“¦ Step 2: Create an Azure Container Instance

  1. Click “Create a resource” (top left corner).
  2. Search for “Container Instances” and select “Create”.

πŸ”§ Step 3: Configure Basic Settings

βœ… Subscription: Select your Azure subscription.
βœ… Resource Group: Create a new one or use an existing one.
βœ… Container Name: Enter a unique name (e.g., myContainerInstance).
βœ… Region: Choose a data center closest to your users.
βœ… Image Source:

  • Quick start image (for testing)
  • Azure Container Registry (if using a private image)
  • Docker Hub (for public images)
    βœ… Image Name: Use a public image (e.g., nginx:latest).
    βœ… OS Type: Choose Linux or Windows.

🌐 Step 4: Configure Networking

βœ… DNS Name Label: Enter a unique label (e.g., mycontainer123).
βœ… Port: Enter 80 (if deploying a web app).
βœ… Restart Policy:

  • Always (keeps running)
  • Never (one-time execution)
  • On failure (restarts on errors)

βœ… Step 5: Review & Create

  1. Click “Review + Create”.
  2. Verify settings and click “Create”.
  3. Wait for the deployment to complete (~2 minutes).

πŸš€ Step 6: Access Your Running Container

  1. Go to Azure Portal β†’ Container Instances.
  2. Click on your container.
  3. Copy the FQDN (Fully Qualified Domain Name).
  4. Open it in your browser (http://mycontainer123.region.azurecontainer.io).
  5. πŸŽ‰ If using nginx, you should see the default Welcome to Nginx! page!

πŸ’» Step 7: Deploy a Custom Container via Azure CLI

Alternatively, you can create a container using Azure CLI.

  1. Login to Azure:
    az login
  2. Create a Resource Group (if not created earlier):
    az group create –name MyResourceGroup –location eastus
  3. Deploy a Container (Example: Nginx):

 az container create –resource-group MyResourceGroup \

 –name mynginxcontainer \

  –image nginx \

  –dns-name-label mynginx123 \

  –ports 80

  1. Get Container Details:
    az container show –resource-group MyResourceGroup –name mynginxcontainer –query ipAddress.fqdn –output tsv
  2. Copy the URL and open it in a browser.

πŸ”„ Step 8: Manage & Scale Your Container

  1. View Running Containers:
    az container list –output table
  2. Check Logs:
    az container logs –resource-group MyResourceGroup –name mynginxcontainer
  3. Delete the Container (if no longer needed):
    az container delete –resource-group MyResourceGroup –name mynginxcontainer

πŸ—‘οΈ Step 9: Cleanup Resources (To Avoid Costs)

  1. If you no longer need the container:

az group delete –name MyResourceGroup –yes –no-wait

Similiar Posts

View All AZURE

Download Syllabus

Fill up the form below to download the syllabus