简体   繁体   English

将伪 TTY 与 Azure 容器实例一起使用?

[英]Using pseudo-TTY with Azure Container Instances?

Is it possible to start docker containers in Azure with the docker --tty argument through the Azure Command-line Interface?是否可以通过 Azure 命令行界面使用 docker --tty 参数在 Azure 中启动 docker 容器? I see nothing in the documentation and I'd like to be able to attach to a tmux session.我在文档中没有看到任何内容,我希望能够附加到 tmux 会话。

I think you want to add the parameter --tty is to create a terminate and interact with the container instance.我想你要添加参数--tty是为了创建一个终止并与容器实例交互。 But it's not a parameter supported by Azure Container Instance.但它不是 Azure 容器实例支持的参数。 You can see all the supported parameters in CLI commands az container .您可以在 CLI 命令az container查看所有支持的参数。 To create a terminate and interact with the container instance, you could use the CLI command az container exec to achieve it, just like:要创建终止并与容器实例交互,您可以使用 CLI 命令az container exec来实现它,就像:

az container exec -g MyResourceGroup --name mynginx --container-name nginx --exec-command "/bin/bash"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM