Daniel Nilsen

04/27/2022, 10:58 AM
Hi! I am building using the Docker storage. In the console I see these steps. In step 7, where does the file
come from? I do have a flow named
but no file with that name.
INFO - prefect.Docker | Building the flow's Docker storage...
Step 1/18 : FROM prefecthq/prefect:1.0.0-python3.7
 ---> 2005944ce1c0
Step 2/18 : ENV PYTHONPATH='$PYTHONPATH:modules/'   PREFECT__USER_CONFIG_PATH='/opt/prefect/config.toml'
 ---> Using cache
 ---> 749cf2ee64e6
Step 3/18 : RUN pip install pip --upgrade
 ---> Using cache
 ---> 9f046e7adbe1
Step 4/18 : RUN pip show prefect || pip install git+<[all_orchestration_extras]>
 ---> Using cache
 ---> 27acea17a687
Step 5/18 : RUN pip install graphql-core
 ---> Using cache
 ---> 2c30c81c1d46
Step 6/18 : RUN mkdir -p /opt/prefect/
 ---> Using cache
 ---> 5976f2fd06b9
Step 7/18 : COPY my-flow.flow /opt/prefect/flows/my-flow.prefect

Anna Geller

04/27/2022, 11:07 AM
Good question! By default, Docker storage pickles your flow and copies this pickled file into your container image at build time (during flow registration). This is what happens in that step - this example uses this method There are many options to set this up - you could use e.g. script storage instead, but this requires you to build the image yourself from a Dockerfile rather than letting Prefect do that for you. This example shows that