https://prefect.io logo
Title
p

PKay

12/27/2022, 5:14 PM
Hi all, anyone found some good documentation on how to build custom docker images. Really confused by the Prefect blocks UI and logging not providing any information. Usually the agent crashes and resulting in the flow run to enter the state of "PENDING" or "CRASHED", provides no information why the image (from registry) wasn't pulled and executed.
1
b

Bianca Hoch

12/28/2022, 5:52 PM
Hello Pkay, here are some resources to get you started on creating a custom docker image. • How can I run my flow in a Docker container with a custom image?How can I run my flow in a Docker container? (contains a section on Docker deployment using a custom Dockerfile)Docker image docsprefect-docker docs It may help to enable debug-level logs on the agent to see if more information is given on why a flow run enters a state of
Pending
or
Crashed
. To enable debug-level logs for the agent, you can add this environment variable to the agent yaml file:
env:
        - name: PREFECT__LOGGING__LEVEL
          value: 'DEBUG'
p

PKay

01/03/2023, 10:12 AM
@Bianca Hoch - Thank ypou, the examples you provided are for Prefect 2.0. beta (2.0b8 and lower)
@Bianca Hoch - Thank you, the examples you provided however seems to be for Prefect 2.0. beta (2.0b8 and lower) For anyone needing some more information on using a custom docker image with Prefect. Make sure you create a docker registry block first. I'm using Dockerhub, so the registry url will be docker.io For the Docker Container, select the docker registry block you created. Under the image you type the full name of the tag of the image, mine was "myusername/myimagename:latest"
:gratitude-thank-you: 1
:upvote: 1