Minimal prefect Dockerfile from a base image

The prefect images on dockerhub are nice, but tend to expire (security vulns) and in order to keep security on top, we want to build docker images from base images like python:3.9 etc.

I am thinking explicitly of images to run prefect flows on, we don’t need the prefect server/UI components. The Dockerfile from the prefect github repo on the other hand, seems unnecessarily large for most purposes as they include all these components.

Often, this has been as simple as pip-installing prefect. But this doesn’t always work (like when running on Azure Container Instances). Discussions on the slack as well often mention entrypoints etc.

Does anyone have a more solid, minimal Dockerfile that we can use as a starting point for our flow images?

2 Likes