<@ULVA73B9P> when deploying from a prefect YAML th...
# ask-marvin
j
@Marvin when deploying from a prefect YAML that has
build
actions but no docker build or push actions, how do I prevent this message from appearing every time I want to
prefect deploy
?
Copy code
Would you like to build a custom Docker image for this deployment?
m
To prevent the custom Docker image prompt from appearing during deployment when using a
prefect.yaml
file, you can set the
"prefect-docker"
build step directly in your YAML file. This setup avoids being prompted every time you run
prefect deploy
. Here's an example of how you can define an empty build step in your
prefect.yaml
to bypass the Docker build prompt:
Copy code
yaml
build:
  # Define any build steps here, omit docker build steps if not required
  steps: []
By setting
steps: []
for the build section, you are explicitly indicating that no build steps are needed. This setting tells Prefect there are no Docker build actions to perform, thus skipping the Docker image prompt. For more details, you can refer to Prefect's documentation: Prefect YAML. Is there something more specific you need?
k
I think there's a
--no-prompt
flag that'll turn off all the interactive stuff
yeah like
prefect --no-prompt deploy
gratitude thank you 1
j
from the
--help
I guess this is the config setting
PREFECT_CLI_PROMPT
? I guess I can set this to
false
?
I'll see what happens. I'm afraid by doing this that I might be missing out on helpful/important prompts elsewhere thinker
k
seems like that's a root CLI setting that'll globally disable prompts
j
yeah probably a bad idea
I'll stick to
prefect --no-prompt deploy
, thanks Kevin
1