Leon Kozlowski
07/14/2021, 3:10 PM--build-arg
for a Dockerfile to the prefect register CLI command?Leon Kozlowski
07/14/2021, 3:23 PMbuild_kwargs
in Docker
storage
https://github.com/PrefectHQ/prefect/blob/5de58efaba956b431335d99acab07eaf6a362e1b/src/prefect/storage/docker.py#L105Kevin Kho
Leon Kozlowski
07/14/2021, 3:42 PMTypeError
TypeError: build() got an unexpected keyword argument <MY_ARGUMENT>
I could be wrong on this but, when running the docker.APIClient().build(…)
function here I believe they build_kwargs
on prefect side should be passed buildargs
on the docker sideKevin Kho
Leon Kozlowski
07/14/2021, 3:45 PM# Building flow storage via `prefect.storage`
flow.storage = Docker(
dockerfile="Dockerfile",
env_vars=config.ENVIRONMENT_VARIABLES,
image_name=config.DOCKER_IMAGE_NAME,
image_tag=config.DOCKER_IMAGE_TAG,
registry_url=config.DOCKER_REGISTRY_URL,
build_kwargs={"MY_ARGUMENT": os.getenv("MY_ARGUMENT")},
) # pragma: no cover
Kevin Kho
Kevin Kho
flow.storage = Docker(
build_kwargs={"buildargs":{"MY_ARGUMENT": "YO"}},
)
Leon Kozlowski
07/14/2021, 3:54 PMKevin Kho