I am trying to create a docker container in google cloud run, which has a google cloud storage bucket as a shared folder. Tried and searched a lot, no luck. Gow to implement this? Anybody please???
Asked
Active
Viewed 740 times
0
-
What's your requirement for attaching Storage bucket? What's the use case? – guillaume blaquiere Aug 16 '19 at 12:53
-
Can you described what you've tried so far? What issues have you come across? As @guillaumeblaquiere said, cloud Run is stateless but it is possible to connect to [Cloud Storage](https://cloud.google.com/run/docs/using-gcp-services). This [question](https://stackoverflow.com/questions/55908257/whats-the-default-storage-for-google-cloud-run) might help as well. – Corinne White Aug 16 '19 at 14:04
-
@Corinne White I tried ways to add the cloud storage bucket to docker container ( in cloud run). But I found no way to do it. – Noxious Reptile Aug 16 '19 at 15:02
1 Answers
0
Google Cloud Run is stateless by definition. That means, you can't attach disk or storage to it. However, it's possible to perform operation to red/write to components, like storage or Cloud SQL.
For the future, personally, I think that this philosophy won't change.
Edit: You have a in memory file system in /tmp. The space allowed equals cloud run memory param minus docker running memory footprint.

guillaume blaquiere
- 66,369
- 2
- 47
- 76
-
The requirement is to create a datascience docker container as cloud run, for development purpose. And the files created inside this container should be saved into a google cloud storage bucket. I tried multiple ways. No success. – Noxious Reptile Aug 16 '19 at 13:46
-
I edited my response. You can work locally with in memory file system. At the end of the process you can push your files to GCS. I'm not sure that you have to read and write in real time. Is it could work? – guillaume blaquiere Aug 16 '19 at 14:08
-
But how can i do it? All I need is to push the saved files to cloud storage bucket. But I am not able to make it work. I could nt find any working material. – Noxious Reptile Aug 16 '19 at 15:05
-
1I don't know your process. But before returning code 200, you can't perform a copy to GCS? It's not to perform in the docker file but in your app. – guillaume blaquiere Aug 16 '19 at 15:57