5
votes

I'm trying to take my first baby steps with podman (instead of Docker) and Google Cloud Run. I've managed to build an image with a gcr.io tag and push it to Google. I then create a new service, and I can select the image in the "Select Image URL" pop-up dialog. But then the service fails to start, saying "Image [full name] not found".

I can't find anything on Google's support pages, or anywhere else. I can pull the image, I can push new versions, and they appear on the pop-up dialog. But the service still reports that they can't be found.

What am I doing wrong?

Edit in answer to DazWilkin's questions below:

Can you run the podman-created container locally using Docker?

I can't run Docker locally because it is not compatible with Fedora 31 (hence podman). But I can run it locally using podman run

Can you deploy a Docker-created container in Cloud Run?

As above: F31. However podman is supposed to be a drop-in replacement.

Is the container registry in the same project as Cloud Run?

Yes. I did have a problem with that, but I got a permissions message rather than "not found".

Have you tried deploying via gcloud rather than the console?

Yes.

$ podman push eu.gcr.io/my-project/hs-hello-world
Getting image source signatures
Copying blob c7f3d2e0289b done  
Copying blob def7032cea8e done  
Copying config f1c2e2615f done  
Writing manifest to image destination
Storing signatures

$ gcloud run deploy --image eu.gcr.io/my-project/hs-hello-world --platform managed
Service name (hs-hello-world):  
Deploying container to Cloud Run service [hs-hello-world] in project [my-project] region [europe-west1]
X Deploying... Image 'eu.gcr.io/my-project/hs-hello-world' not found.                     
  X Creating Revision... Image 'eu.gcr.io/my-project/hs-hello-world' not found.           
  . Routing traffic...                                                                             
Deployment failed                                                                                  
ERROR: (gcloud.run.deploy) Image 'eu.gcr.io/my-project/hs-hello-world' not found.

When I used a Google-built container it worked fine.

Update: 5 March 2020

In the end I just carried on with the Google build service, and it works fine. My initial wish for local builds was in large part because a build on Google was taking over half an hour (lots of Haskell libraries to import), but now I've figured out how to use staged builds and multi-processor VMs to avoid this. I appreciate the efforts of those who have tried to help, but right now it's not broke so I'm not going to try to fix it.

2
Can you run the podman-created container locally using Docker? Can you deploy a Docker-created container in Cloud Run? Is the container registry in the same project as Cloud Run? Have you tried deploying via gcloud rather than the console? If so, please include the commands in the question. - DazWilkin
Could you share the steps you follow to install podman to Google Cloud Platform? - Nibrass H
@NibrassHaider Not quite sure what you mean. I'm running podman locally and then pushing the resulting container up to gcloud. - Paul Johnson
Could you try to add the latest tag while pushing to the container registry? podman push eu.gcr.io/my-project/hs-hello-world:latest (in order to discard that it could be the issue). and try to pull like following: gcloud run deploy --image eu.gcr.io/my-project/hs-hello-world - Nibrass H
@André Breda's answer is working and should be marked as the accepted answer. - tremoloqui

2 Answers

11
votes

I had the same issue: it seems Cloud Run is picky about the kind of manifest it can pull.

By building my images with --format docker and pushing them with --remove-signatures (inspired by this issue), podman will create and push docker-style manifests to the Container Registry and everything ran smoothly!

Too bad I spent a lot of time thinking it was a lack of permissions problem

-1
votes

I've been having the same issue today. I'm using buildah to create the new image. I realized that the image I used successfully yesterday was built as root. So I built the new one as root and pushed it successfully.

Wish I knew why. The images built as my username ran fine locally with rootless podman.