I'm attempting to deploy a flow to Google Cloud Ru...
# prefect-getting-started
m
I'm attempting to deploy a flow to Google Cloud Run. I've built a docker image that runs successfully locally. To deploy I'm running
prefect deploy
and following the CLI prompts. The CLI successfully pushes my image to dockerhub and successfully deploys my flow+deployment to my work pool on Prefect Cloud. However, when triggering the deployment, Google Cloud Run fails to run it with the following error (images below) The Prefect Cloud UI mentions:
Task transparent-platypus-fzwd9-task0 failed with message: The container exited with an error. (Error Code: 1)
This may be caused by attempting to run an image with a misspecified platform or architecture.
This error is super vague, not really sure how to debug, but I imagine I'm making an obvious mistake here. Any idea how is it possible that this image runs locally with
docker run <image_name>
but fails to run on Google Cloud Run? I've attached an image of my responses to the CLI prompts and my dockerfile (don't worry I will rotate that exposed API key)
k
are you on an m1 or m2 mac?
m
M3
k
oh m3 is a thing too isn't it
m
Time flies, I know
k
in your dockerfile, immediately after FROM and before the image name you've got there, add --platform=linux/amd64
m
So to confirm, like this?
k
yep, here's reference about what it does https://docs.docker.com/reference/dockerfile/#from
m
Trying this now, thank you for linking the docs as well. I'm definitely not great with docker. 🫡
🫡 1
This solved that error, thank you Kevin
k
happy to help!