Is it possible to expose/open more than one port on an Azure Container Instance? I've only been able to open one port per container.
I'd like to run the equivalent of: docker run -p 80:80 -p 443:443 ...
I've unsuccessfully tried:
az container create ... --port 80 --port 443
az container create ... --port 80 443
But the resource JSON seems to indicate that an array is possible:
az container show -name <container-name> --resource-group <resource-group-name>
Response:
{
"containers": [
{
...
"name": "...",
"ports": [
{
"port": 80
}
...
}
],
...
"ipAddress": {
"ip": "xxx.xxx.xxx.xxx",
"ports": [
{
"port": 80,
"protocol": "TCP"
}
]
},
...
}
This can now be done via Azure CLI. Example is below:
az container create -g MyResourceGroup --name myalpine --image alpine:latest --ip-address public --ports 80 443
https://docs.microsoft.com/en-us/cli/azure/container?view=azure-cli-latest#az_container_create