我正在运行带有自定义容器镜像的Azure Web应用程序(容器)。我已经按照步骤将ssh启用到容器镜像中,并且当我仅运行单个容器时,它的效果很好。但是,当我将该应用程序作为具有多个容器镜像的多容器应用程序(带有docker-compose文件)运行时,出现以下错误。对于其他上下文,这是一个小型的python Web应用程序,它使用nginx和redis,因此需要多个容器。我的自定义镜像中只有一个启用了ssh并正在运行并公开端口2222。
这有可能吗?如果不是,那么我不确定如果出于支持目的无法访问容器时运行Web应用程序多容器的可行性。
az webapp remote-connection create -g GROUPNAME -n APPNAME -p 2222 --verbose
Configured default 'GROUPNAME' for arg resource_group_name
remote-connection is deprecated and moving to cli-core, use `webapp create-remote-connection`
Port 2222 is open
Creating a socket on port: 2222
Setting socket options
Binding to socket on local address and port
Finished initialization
Status response message: FAILURE:2222:Unable to connect to WebApp
WARNING - Remote debugging may not be setup properly. Reponse content: FAILURE:2222:Unable to connect to WebApp
SSH is available { username: root, password: Docker! }
Start your favorite client and connect to port 2222
我也尝试了create-remote-connection命令,但是得到了类似的结果。
az webapp create-remote-connection -n APPNAME -g GROUPNAME --verbose &
我收到的错误是:
Auto-selecting port: 52661
Finished initialization
Status response message: FAILURE:2222:Unable to connect to WebApp
WARNING - Remote debugging may not be setup properly. Reponse content: FAILURE:2222:Unable to connect to WebApp
Connection is not ready yet, please wait
.
Status response message: FAILURE:2222:Unable to connect to WebApp
WARNING - Remote debugging may not be setup properly. Reponse content: FAILURE:2222:Unable to connect to WebApp
最佳答案
看起来不支持它:(
看到...
How to SSH in to different containers in Multi Container Azure App Service
和...
Support SSH to specific container in multi-container setup