输入与Google Cloud Run一起运行的Docker容器 [英] Enter a docker container running with Google Cloud Run

查看:95
本文介绍了输入与Google Cloud Run一起运行的Docker容器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以输入由 Google Cloud Run 驱动的容器?是否以 docker exec -it CONTAINER/bin/bash 的方式出现?

Is it possible to enter a container powered by Google Cloud Run? Something in the manner of docker exec -it CONTAINER /bin/bash?

我遇到一个错误,我无法在本地或基于Google Cloud Shell的容器上基于相同的映像来重现运行容器.
对于使用Cloud Shell连接到Cloud Run还是从本地环境进行连接,我并不挑剔.

I'm facing a bug i can't reproduce running a container based on the very same image neither locally nor using Google Cloud Shell to run that container.
I'm not picky regarding whether it comes to using Cloud Shell to connect to Cloud Run or doing so from my local environment.

推荐答案

是否可以输入由Google Cloud Run驱动的容器?

Is it possible to enter a container powered by Google Cloud Run?

否,您只能通过HTTP/HTTPS请求访问该服务的唯一端口是$ PORT(当前为8080).

No, the only port you can access the service is $PORT (currently 8080) and only via HTTP/HTTPS requests.

您将需要调试老式方法:将语句记录到Google Stackdriver(它已内置到Cloud Run中),只需为您的语言执行"logging.info(...)"即可.

You will need to debug the old fashioned way: logging statements to Google Stackdriver - which is already built-in to Cloud Run, just do "logging.info(...)" for your language.

如果您的问题是容器启动,请检查Stackdriver以获取错误消息.

If your problem is container startup, check Stackdriver for error messages.

这篇关于输入与Google Cloud Run一起运行的Docker容器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆