# Lab 09b: Implement Azure Container Instances

![Diagram of the tasks.](https://raw.githubusercontent.com/MicrosoftLearning/AZ-104-MicrosoftAzureAdministrator/master/Instructions/media/az104-lab09b-aci-architecture.png align="left")

**Objective:** This lab demonstrates how to deploy and test a containerized web application using Azure Container Instances (ACI).

**Scenario:** Your organization is evaluating Azure Container Instances as a solution for deploying a web application to the cloud without managing virtual machines. This is part of a broader effort to reduce infrastructure management overhead.

**Key Concepts:**

* **Azure Container Instances (ACI):** A serverless compute service for running containers directly on Azure. It's ideal for simple applications, task automation, and build jobs, removing the need to manage underlying VMs.
    
* **Docker Image:** A package containing an application and its dependencies, ensuring consistent execution across different environments.
    
* **Container Group:** A collection of containers scheduled together on the same host in ACI. This lab uses a single-container group.
    

## Job skills

* Task 1: Deploy an Azure Container Instance using a Docker image.
    
* Task 2: Test and verify deployment of an Azure Container Instance.
    

**Lab Tasks:**

**Task 1: Deploy an Azure Container Instance**

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1741040997549/29f1130c-af41-4538-9138-ee4c009a8262.png align="center")

1. **Sign In:** Log in to the Azure portal ([https://portal.azure.com](https://portal.azure.com/)).
    
2. **Create Container Instance:** Search for and select "Container instances." and click "+ Create."
    
    * **Basics:**
        
        * Container name: `az104-c1`
            
        * Image source: `Quickstart images`
            
        * Image: `mcr.microsoft.com/azuredocs/aci-helloworld:latest (Linux)`
            
    * **Networking:** DNS name label: (Enter a *globally unique* name. This forms your container's public URL.) *If you receive an error, try a different name.*
        
    * **Monitoring:** Uncheck `Enable container instance logs`. (Simplifies the lab; you can explore logging later.)
        
    * **Advanced:** Accept the defaults then review + create\*\*:\*\* Verify the settings and click "Create.
        
3. **Wait for Deployment:** Allow 2-3 minutes for the deployment to complete.
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1741041168834/209b6852-0aaf-45ae-b19e-50c538614372.png align="center")

**Task 2: Test and Verify Deployment**

1. **Go to Resource:** On the "Overview" blade, confirm the "Status" is `Running`.
    
2. **Access the Application:**
    
    * Copy the `FQDN` from the "Overview" blade.
        
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1741041387665/eb396721-a479-48e3-85de-d31230173737.png align="center")
    
    * Open a new browser tab and paste the FQDN. You should see the "Welcome to Azure Container Instances" page.
        
3. **View Logs (Optional):**
    
    * In your container instance, under "Settings," select "Containers."
        
    * Select "Logs."
        
    * You should see HTTP request logs from your browser. Refresh the web page a few times to generate more log entries.
        

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1741041706530/25bbd527-f8aa-43a9-b6a1-3c7e13f80221.png align="center")

**Cleanup (Crucial):**

* Delete the `az104-rg9-lod48969906` resource group to remove all lab resources. This prevents ongoing charges.
