https://prefect.io logo
Title
m

Maikel Penz

12/15/2022, 3:17 AM
Another one. In Prefect 1.0 I was able to build a Docker image and push it to my registry. E.g
Docker(
    registry_url=registry_url,
    image_name=image_name,
    image_tag=image_tag,
    files=workflow_files,
    env_vars=env_vars,
    extra_dockerfile_commands=pip_commands
).build(push=True)
I understand the new concept on 2.0 where we reference a block, which references an image. But by any chance are there utilities to help building and pushing workflow base images?
j

Joël Luijmes

12/15/2022, 2:55 PM
I just built a dockerfile with python as base, and install prefect within (along with other flow dependencies). This docker image is build and pushed in the CI. Then I created a custom kubernetes job block in which I reference the base image. For me this works fine 🙂
m

Maikel Penz

12/15/2022, 7:58 PM
All good. That's what I feel I'll have to do as well. I wish the ability to build and push the image with their python API was somewhere in 2.0 as it was on 1.0, to make it simpler.