iT邦幫忙

第 12 屆 iThome 鐵人賽

DAY 13
0
Microsoft Azure

深入 Azure 雲端服務系列 第 10

Azure CLI + Powershell + ARM Template + Docker 整合從無到有快速布置網頁

Azure CLI + Powershell + ARM Template + Docker 整合從無到有快速布置網頁


這次我們整合前面幾章所學,將 Azure CLI + Powershell + ARM Template + Linux + Docker 整合做一個網頁從無到有快速布置。

這樣的功能動態建立的 script 要寫多少命令呢?

只需要短短幾行命令 :

$guid = [System.guid]::NewGuid().toString("N");
az group create --name $guid --location eastasia
$json = az deployment group create --resource-group $guid --template-uri "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-aci-linuxcontainer-public-ip/azuredeploy.json" ;
$docker = $json | ConvertFrom-Json ;
$ip = $docker.properties.outputs.containerIPv4Address.value ;
curl "http://$ip/" | grep "<title>.*</title>"

image-20200924215321337

image-20200924215454695


上一篇
Azure Docker - Container Registry (ACR) - 基本
下一篇
Azure Docker - 使用 WSL2 管理/開發 Azure 資源
系列文
深入 Azure 雲端服務15
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言