Skip to content

Commit

Permalink
Azure Container Instances - Linux container with public IP
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmck committed Jul 26, 2017
1 parent 8f82245 commit 90e27b3
Show file tree
Hide file tree
Showing 4 changed files with 99 additions and 0 deletions.
3 changes: 3 additions & 0 deletions 101-aci-linuxcontainer-public-ip/README.md
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/).
68 changes: 68 additions & 0 deletions 101-aci-linuxcontainer-public-ip/azuredeploy.json
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 101-aci-linuxcontainer-public-ip/azuredeploy.parameters.json
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"
}
}
}
7 changes: 7 additions & 0 deletions 101-aci-linuxcontainer-public-ip/metadata.json
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"
}

0 comments on commit 90e27b3

Please sign in to comment.