<@U04EATBG0E8> how do I use Docker with Prefect?
# ask-marvin
k
@ask-marvin how do I use Docker with Prefect?
a
Let me check that for you @Kalise Richmond
You can use Docker as a virtual machine to run Prefect's
k
@ask-marvin how do I run a flow with Docker?
a
Let me check that for you @Kalise Richmond
You can use the
run_in_docker
function to do that. Here is an example:```from prefect import flow, taskfrom prefect.utilities.docker import run_in_docker@flow(name="my-flow", state=["A", "B"], subflows=[run_in_docker(name="C"), run_in_docker(name="D")])def my_flow(): A, B = run_in_docker( name="C") D = run_in_docker( name="D") print(A) print(B)my_flow()```