PrefectHQ / prefect

Prefect is a workflow orchestration framework for building resilient data pipelines in Python.
https://prefect.io
Apache License 2.0
17.42k stars 1.64k forks source link

Ability to save the Dockerfile created by `build_docker_image` deployment step #12938

Open discdiver opened 1 year ago

discdiver commented 1 year ago

First check

Prefect Version

2.x

Describe the current behavior

No Dockerfile is persisted.

Describe the proposed behavior

A Dockerfile is persisted.

Example Use

The user could then inspect the Dockerfile to make deployments with Docker more transparent.

The user could also then modify the Dockerfile and specify the modified Dockerfile in prefect.yaml.

Additional context

I talked to @desertaxle about this a bit already.

In my own use and at PACC it was observed that this functionality would be helpful for debugging.

serinamarie commented 1 year ago

I think if we removed deletion of the Dockerfile at the end of prefect_docker.steps.build_docker_image, the Dockerfile will persist, but the build step will still have dockerfile: auto which would no longer be accurate the next time that the build step was run, as we'd want to use the Dockerfile they have. So we'd want to think about that.