是否可以通过 Azure 命令行界面使用 docker --tty 参数启动 Azure 中的 docker 容器?我在文档中没有看到任何内容,我希望能够附加到 tmux session 。
最佳答案
我认为你要添加参数--tty
是为了创建一个终止并与容器实例交互。但它不是 Azure 容器实例支持的参数。您可以在CLI命令az container
中看到所有支持的参数。 。要创建终止并与容器实例交互,您可以使用 CLI 命令 az container exec
要实现它,就像:
az container exec -g MyResourceGroup --name mynginx --container-name nginx --exec-command "/bin/bash"
关于azure - 将伪 TTY 与 Azure 容器实例结合使用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59495715/