Skip to content

Instantly share code, notes, and snippets.

@lizrice
Created September 13, 2017 13:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save lizrice/0a05339473a9e3090184daca2f264344 to your computer and use it in GitHub Desktop.
Save lizrice/0a05339473a9e3090184daca2f264344 to your computer and use it in GitHub Desktop.
Example template for multi-container group in Azure Container Instance deployment
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
},
"resources": [
{
"name": "helloContainerGroup",
"type": "Microsoft.ContainerInstance/containerGroups",
"apiVersion": "2017-08-01-preview",
"location": "[resourceGroup().location]",
"properties": {
"containers": [
{
"name": "hello-web",
"properties": {
"image": "lizrice/hello:hardcoded",
"resources": {
"requests": {
"cpu": 0.5,
"memoryInGb": 0.5
}
},
"ports": [
{
"port": 8080
}
]
}
},
{
"name": "hello-pg",
"properties": {
"image": "lizrice/hello-postgres",
"resources": {
"requests": {
"cpu": 0.5,
"memoryInGb": 0.5
}
},
"ports": [
{
"port": 5432
}
]
}
}
],
"osType": "Linux",
"ipAddress": {
"type": "Public",
"ports": [
{
"protocol": "tcp",
"port": "8080"
}
]
}
}
}
],
"outputs": {
"containerIPv4Address": {
"type": "string",
"value": "[reference(resourceId('Microsoft.ContainerInstance/containerGroups/', 'helloContainerGroup')).ipAddress.ip]"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment