Since Cloud Run uses docker images, you can use the GCP cloud shell (Cloud shell already has docker installed).
Also, you need get the container registry image used for your cloud run service, to get it, please follow this steps:
1.- Choose your service from the cloud run services list
2.- In the service page, go to revision tab.
3.- Click on image URL.
4.- In the image details page, click on Show Pull Command
and the image used will have the following format
gcr.io/[imagename]
for example gcr.io/cloudrun/hello:latest
In cloud shell run the following command
docker run -it --entrypoint sh {image-name}
For example:
docker run -it --entrypoint sh gcr.io/cloudrun/hello
This command will open a new shell within your docker container (to exit hit, ctrl+d
), run the command ls -lah
to see the files within your docker image, to see the content of any file use the cat
command.
*your google account used in Google Cloud Console must have access to the container registry image