{ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "parameters": { "name": { "type": "string", "metadata": { "description": "Name for the container group" }, "defaultValue": "ntttcp-linux" }, "image": { "type": "string", "metadata": { "description": "Container image to deploy. Should be of the form accountName/imagename:tag for images stored in Docker Hub or a fully qualified URI for a private registry like the Azure Container Registry." }, "defaultValue": "pedroperezmsft/ntttcp-linux" }, "controlport": { "type": "string", "metadata": { "description": "Control port." }, "defaultValue": "5000" }, "dataport1": { "type": "string", "metadata": { "description": "Data port.." }, "defaultValue": "5001" }, "dataport2": { "type": "string", "metadata": { "description": "Data port.." }, "defaultValue": "5002" }, "dataport3": { "type": "string", "metadata": { "description": "Data port.." }, "defaultValue": "5003" }, "dataport4": { "type": "string", "metadata": { "description": "Data port.." }, "defaultValue": "5004" }, "cpuCores": { "type": "string", "metadata": { "description": "The number of CPU cores to allocate to the container. Must be an integer." }, "defaultValue": "2.0" }, "memoryInGb": { "type": "string", "metadata": { "description": "The amount of memory to allocate to the container in gigabytes." }, "defaultValue": "1.5" } }, "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('controlport')]" }, { "port": "[parameters('dataport1')]" }, { "port": "[parameters('dataport2')]" }, { "port": "[parameters('dataport3')]" }, { "port": "[parameters('dataport4')]" } ], "resources": { "requests": { "cpu": "[parameters('cpuCores')]", "memoryInGb": "[parameters('memoryInGb')]" } } } } ], "osType": "Linux", "ipAddress": { "type": "Public", "ports": [ { "protocol": "tcp", "port": "[parameters('controlport')]" }, { "protocol": "tcp", "port": "[parameters('dataport1')]" }, { "protocol": "tcp", "port": "[parameters('dataport2')]" }, { "protocol": "tcp", "port": "[parameters('dataport3')]" }, { "protocol": "tcp", "port": "[parameters('dataport4')]" } ] } } } ], "outputs": { "containerIPv4Address":{ "type": "string", "value": "[reference(resourceId('Microsoft.ContainerInstance/containerGroups/', parameters('name'))).ipAddress.ip]" } } }