将伪 TTY 与 Azure 容器实例一起使用?
Using pseudo-TTY with Azure Container Instances?
是否可以通过 Azure 命令行界面使用 docker --tty 参数在 Azure 中启动 docker 容器?我在文档中看不到任何内容,我希望能够附加到 tmux 会话。
我想你要加参数--tty
是为了创建一个terminate并与容器实例交互。但它不是 Azure 容器实例支持的参数。你可以在CLI命令中看到所有支持的参数az container
. To create a terminate and interact with the container instance, you could use the CLI command az container exec
来实现它,就像:
az container exec -g MyResourceGroup --name mynginx --container-name nginx --exec-command "/bin/bash"
是否可以通过 Azure 命令行界面使用 docker --tty 参数在 Azure 中启动 docker 容器?我在文档中看不到任何内容,我希望能够附加到 tmux 会话。
我想你要加参数--tty
是为了创建一个terminate并与容器实例交互。但它不是 Azure 容器实例支持的参数。你可以在CLI命令中看到所有支持的参数az container
. To create a terminate and interact with the container instance, you could use the CLI command az container exec
来实现它,就像:
az container exec -g MyResourceGroup --name mynginx --container-name nginx --exec-command "/bin/bash"