Instantly share code, notes, and snippets.

Embed
What would you like to do?
Azure Container Instance - Virtual Network Deployment
# create a resource group
az group create --name containers1 --location westeurope
# create a virtual network
az network vnet create --resource-group containers1 --name aci_vnet1
# list available delegations
az network vnet subnet list-available-delegations --resource-group containers1
# create a subnet
az network vnet subnet create --resource-group container1 \
--vnet-name aci_vnet1 --name aci_subnet1 \
--address-prefix 10.0.0.0/24 \
--delegation
# deploy ACI
az container create \
--resource-group containers1 \
--image mcr.microsoft.com/mssql/server:vNext-CTP2.0-ubuntu \
--name testcontainer1 \
--ports 1433 \
--vnet-name aci_vnet1 \
--subnet aci_subnet1 \
--environment-variables ACCEPT_EULA=Y SA_PASSWORD=Testing1122
# confirm ACI deployed successfully
az container show --name testcontainer1 --resource-group containers1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment