# Add a new container

From the menu select **Container instances** then click **Add container**.

<figure><img src="/files/2KUVgbtsWXSXIdGXb9Cu" alt=""><figcaption></figcaption></figure>

Complete the configuration, using the table below as a guide:

| Field/Option          | Overview                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Subscription          | Select the subscription you want to use for the container.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| Resource Group        | If two or more resource groups exist, select the resource group to use.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| Location              | Select which Azure datacenter to run the container in. If virtual networks are available in a location, a count will be displayed alongside the location name.                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| Name                  | Give the container a descriptive name.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| Image                 | Enter the name of the image that will be used to deploy the container.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| OS                    | Select the OS (typically Linux or Windows).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| Environment variables | <p>Optionally include any environment variables that you would like to pass to the container. Click <strong>Add an environment variable</strong> to add variables individually, or <strong>Load variables from .env file</strong> to upload a file containing your variables. You can also select <strong>Advanced mode</strong> to switch to an editor view where you can paste a block of variables and values.<br></p><p>Note that secret environment variables should be created outside of Portainer. Variables created this way will still be displayed in Portainer, with values retracted.</p> |
| Tags                  | Click **Add tag** to add a new tag, and provide the **Name** and **Value** for each tag as needed. Click the trash icon next to a tag to remove it.                                                                                                                                                                                                                                                                                                                                                                                                                                                    |

<figure><img src="/files/nVPpxuzD2vn6MDENR8nX" alt=""><figcaption></figcaption></figure>

### Network Settings

In this section you can configure the network for your container as well as the ports to publish.

| Field/Option    | Overview                                                                                                                                              |
| --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| Private Network | Toggle this option on if you wish to use a pre-existing private network for your container.                                                           |
| Virtual Network | When Private Network is enabled, select the network to use. The selection will be limited on what is available in your selected location.             |
| Subnet          | When Private Network is enabled, select the subnet to use within your network (where relevant).                                                       |
| Ports           | Enter the port number and select TCP or UDP to publish your container on the specified port and protocol. Click Add port to publish additional ports. |

<figure><img src="/files/b8YcRCv2rGUzCRYJA5ym" alt=""><figcaption></figcaption></figure>

### Container Resources

Here you can specify the resources available to your container.

| Field/Option | Overview                                                   |
| ------------ | ---------------------------------------------------------- |
| CPU          | Define how many CPUs to allocate to the container.         |
| Memory (GB)  | Define how much memory in GB to allocate to the container. |

<figure><img src="/files/rp7S6Set4ZkitWuzWR50" alt=""><figcaption></figcaption></figure>

### Volumes

This section lets you specify a volume you want to be accessible from the container.

| Field/Option        | Overview                                                             |
| ------------------- | -------------------------------------------------------------------- |
| Enable volumes      | Toggle this option on to enable adding a volume to this container.   |
| File share name     | Enter the file share name for the volume.                            |
| Storage account     | Enter the name of the storage account with access to the file share. |
| Storage account key | Enter the key for the above storage account.                         |
| Mount path          | Enter the path within the container to mount the volume.             |

<figure><img src="/files/YwZ8S9cvPdrE944jZY8z" alt=""><figcaption></figcaption></figure>

### GPUs

Here you can enable GPU support for the container and specify the GPU to use.

{% hint style="warning" %}
GPUs are currently a preview feature for Azure Container Instances and only available in select locations. Ensure you have access to GPUs before using this feature.
{% endhint %}

| Field/Option | Overview                                                 |
| ------------ | -------------------------------------------------------- |
| Enable GPUs  | Toggle this on to enable GPU support for this container. |
| GPU type     | Select the type of GPU to use.                           |
| GPU count    | Enter the number of GPUs to use.                         |

<figure><img src="/files/3iWX1YUtbHp0oYDmesBO" alt=""><figcaption></figcaption></figure>

When you're ready, click **Deploy the container**. When the deployment has finished, you'll see it in the list of Azure container instances.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.portainer.io/user/aci/containers/add.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
