Skip to content
Advertisement

Why is my java docker image created successfully on laptop but when uploading to google cloud run it fails?

dockerfile:

JavaScript

In local build is successful using the command:

JavaScript

But when trying to upload image to google cloud run using command:

JavaScript

It gives error:

JavaScript

What might be wrong here?

Advertisement

Answer

Couldn’t find an answer so posting the solution that I found on my own.
If you can build docker images on local machine but google cloud run is failing for whatever reason, you can push the locally made image directly to google container registry.

JavaScript

Source: https://cloud.google.com/run/docs/building/containers

Advertisement