forked from Azure/azure-quickstart-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Azure Container Instances - Linux container with public IP
- Loading branch information
Showing
4 changed files
with
99 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Azure Container Instances | ||
|
||
This template demonstrates a simple use case for [Azure Container Instances](https://docs.microsoft.com/en-us/azure/container-instances/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
{ | ||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | ||
"contentVersion": "1.0.0.0", | ||
"parameters": { | ||
"name": { | ||
"type": "string" | ||
}, | ||
"image": { | ||
"type": "string" | ||
}, | ||
"port": { | ||
"type": "string" | ||
}, | ||
"cpuCores": { | ||
"type": "string" | ||
}, | ||
"memoryInGb": { | ||
"type": "string" | ||
} | ||
}, | ||
"variables": { | ||
}, | ||
"resources": [ | ||
{ | ||
"name": "[parameters('name')]", | ||
"type": "Microsoft.ContainerInstance/containerGroups", | ||
"apiVersion": "2017-08-01-preview", | ||
"location": "[resourceGroup().location]", | ||
"properties": { | ||
"containers": [ | ||
{ | ||
"name": "[parameters('name')]", | ||
"properties": { | ||
"image": "[parameters('image')]", | ||
"ports": [ | ||
{ | ||
"port": "[parameters('port')]" | ||
} | ||
], | ||
"resources": { | ||
"requests": { | ||
"cpu": "[parameters('cpuCores')]", | ||
"memoryInGb": "[parameters('memoryInGb')]" | ||
} | ||
} | ||
} | ||
} | ||
], | ||
"osType": "Linux", | ||
"ipAddress": { | ||
"type": "Public", | ||
"ports": [ | ||
{ | ||
"protocol": "tcp", | ||
"port": "[parameters('port')]" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
], | ||
"outputs": { | ||
"containerIPv4Address":{ | ||
"type": "string", | ||
"value": "[reference(resourceId('Microsoft.ContainerInstance/containerGroups/', parameters('name'))).ipAddress.ip]" | ||
} | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
101-aci-linuxcontainer-public-ip/azuredeploy.parameters.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", | ||
"contentVersion": "1.0.0.0", | ||
"parameters": { | ||
"name": { | ||
"value": "helloworld" | ||
}, | ||
"image": { | ||
"value": "microsoft/aci-helloworld" | ||
}, | ||
"port": { | ||
"value": "80" | ||
}, | ||
"cpuCores": { | ||
"value": "1" | ||
}, | ||
"memoryInGb": { | ||
"value": "1.5" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"itemDisplayName": "Azure Container Instances - Linux container with public IP", | ||
"description": "Deploy a single Linux container accessible via a public IP using Azure Container Instances.", | ||
"summary": "This template demonstrates how to create a container group with a single Linux container and a publid IP address using Azure Container Instances.", | ||
"githubUsername": "seanmck", | ||
"dateUpdated": "2017-07-26" | ||
} |