Back to Portainer

Add a new container

user/aci/containers/add.md

1.23.29.9 KB
Original Source

Add a new container

From the menu select Container instances then click Add container.

<figure><figcaption></figcaption></figure>

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

Field/OptionOverview
SubscriptionSelect the subscription you want to use for the container.
Resource GroupIf two or more resource groups exist, select the resource group to use.
LocationSelect 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.
NameGive the container a descriptive name.
ImageEnter the name of the image that will be used to deploy the container.
OSSelect 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.
</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><figcaption></figcaption></figure>

Network Settings

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

Field/OptionOverview
Private NetworkToggle this option on if you wish to use a pre-existing private network for your container.
Virtual NetworkWhen Private Network is enabled, select the network to use. The selection will be limited on what is available in your selected location.
SubnetWhen Private Network is enabled, select the subnet to use within your network (where relevant).
PortsEnter 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><figcaption></figcaption></figure>

Container Resources

Here you can specify the resources available to your container.

Field/OptionOverview
CPUDefine how many CPUs to allocate to the container.
Memory (GB)Define how much memory in GB to allocate to the container.
<figure><figcaption></figcaption></figure>

Volumes

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

Field/OptionOverview
Enable volumesToggle this option on to enable adding a volume to this container.
File share nameEnter the file share name for the volume.
Storage accountEnter the name of the storage account with access to the file share.
Storage account keyEnter the key for the above storage account.
Mount pathEnter the path within the container to mount the volume.
<figure><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/OptionOverview
Enable GPUsToggle this on to enable GPU support for this container.
GPU typeSelect the type of GPU to use.
GPU countEnter the number of GPUs to use.
<figure><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.