Skip to content

Latest commit

 

History

History
38 lines (26 loc) · 1.18 KB

container-instances-create-docker-context.md

File metadata and controls

38 lines (26 loc) · 1.18 KB
title description services author ms.service ms.topic ms.date ms.author ms.custom
include file
include file
container-instances
dlepow
container-instances
include
08/13/2020
danlep
include file

Create Azure context

To use Docker commands to run containers in Azure Container Instances, first log into Azure:

docker login azure

When prompted, enter or select your Azure credentials.

Create an ACI context by running docker context create aci. This context associates Docker with an Azure subscription and resource group so you can create and manage container instances. For example, to create a context called myacicontext:

docker context create aci myacicontext

When prompted, select your Azure subscription ID, then select an existing resource group or create a new resource group. If you choose a new resource group, it's created with a system-generated name. Azure container instances, like all Azure resources, must be deployed into a resource group. Resource groups allow you to organize and manage related Azure resources.

Run docker context ls to confirm that you added the ACI context to your Docker contexts:

docker context ls