David
David

Reputation: 85

Is it possible to use Google Cloud Run to Docker Pull?

Is it possible to use Google Cloud Run to perform a Docker Pull and host an image such as a document or graph database? Can we attach a volume where the data is persisted?

Upvotes: 0

Views: 1007

Answers (1)

ahmet alp balkan
ahmet alp balkan

Reputation: 45216

If you're trying to ask "Can I deploy any image to Cloud Run": Yes, however Cloud Run supports only HTTP protocol and doesn't allow much room for background processing that most databases do. So document/graph databases probably won't work. Also Cloud Run currently doesn't support persistent storage volumes, so you'd have hard time persisting the data written by the database.


If you're trying to ask "Can I pull a docker image inside a Cloud Run container" (not sure why you'd do that): Cloud Run can do most things. At the end of the day, docker pull is just retrieving bunch of tar files and extracting them. You can read the reference docs. Extracting the image may require special processing since you won't have access to COW (copy on write) filesystem drivers like overlayfs, but you can implement this yourself. However, most docker images will be 100s of MBs, and any time you write files to local disk on Cloud Run, it counts towards your memory, so if you pull and extract a 200 MB image, you can easily crash your Cloud Run container if it has 512 MiB memory.

Upvotes: 1

Related Questions