我可以用创建一个容器组
az container create --os-type windows --resource-group dev --name win-sandbox --image mcr.microsoft.com/windows/servercore:1809
然后运行⬇️它只是立即退出,但我想要一个交互式Powershell提示。
az container exec -g dev --name win-sandbox --exec-command "powershell.exe"
这与从docker run
中省略-it
一致,但az container exec
没有这样的选项。
如何获得交互式Powershell提示?
如何获得交互式Powershell提示?
根据Azure文档,当前az container exec
将打开&windows计算机不支持在交互模式下执行。
az container exec
从容器组的运行容器中执行命令。最常见的用例是打开一个交互式bash shell。