Create a container app in the Azure portal

Create a container app in the Azure portal

04 Aug 2024

Here's a step-by-step guide on how to create a container app with 1 replica using the Azure portal:

Prerequisites:

  1. You have an Azure account and are logged in to the Azure portal.
  2. You have Docker installed on your machine.
  3. You have created a Docker image that you want to run as a container.

Step 1: Create a Container Instance

  1. Log in to the Azure portal and navigate to the Container Instances page.
  2. Click on the Create Container Instance button.
  3. Enter a name for your container instance (e.g., "my-container-app").
  4. Choose the Azure Container Registry (ACR) as your registry, if you have one created already. If not, you can create one here.
  5. Select the Docker image you want to run (e.g., microsoft/mcr.microsoft.com/oss/nginx:1.17.9-alpine).
  6. Set the Port to the port number that your container listens on (e.g., 80).

Step 2: Configure Container Instance Settings

  1. Under Instance settings, set the following:
    • Replicas: 1 (since you want only one replica running)
    • Cpu: Choose a value based on your application's requirements (e.g., 0.5 CPU).
    • Memory: Choose a value based on your application's requirements (e.g., 1024 MB).
  2. Click Next: Networking.

Step 3: Configure Networking

  1. Under Networking, you can choose to:
    • Use the Azure Load Balancer to distribute traffic across replicas.
    • Allow incoming traffic from the internet (or restrict it to specific IP addresses or networks).
  2. Click Next: Tags.

Step 4: Add Tags (Optional)

  1. You can add tags to your container instance for organization and filtering purposes.
  2. Click Create to create the container instance.

Verification

Once the container instance is created, you can verify that it's running by:

  1. Going back to the Container Instances page in the Azure portal.
  2. Viewing the status of your container instance (e.g., "Running").
  3. Checking the logs for any errors or issues.

That's it! You now have a container app with 1 replica running on Azure Container Instances.


Find 2 of my best .NET 8 projects with tons of features add value to and capture your audience!

If you are interested in more of my work, you can find it:

Thank you for your time. Kind regards, Auguste @ kiss-code.com


Join the community

I continuously build, learn and experiment with innovative technology. Allow me to share what I learn, with you.

Newsletter

Allow me to share what I learn, with you.

Share

Support

An error has occurred. 🗙