https://prefect.io logo
g

Geoffrey Keating

08/15/2023, 7:19 PM
For a docker worker, how can I specify arguments to the
docker run
command? I can see how I can pack in some environment variables and
--privileged
, but I need to allow for inter-process communication with
--ipc=host
1
And on the same topic, when running a build during deployment, I'm struggling to see how
**build_kwargs
could pass through a command-line equivalent of
--ssh default
a

alex

08/15/2023, 7:59 PM
Hey @Geoffrey Keating! Prefect’s Docker integrations use
docker-py
under the hood, so
**build_kwargs
on
build_docker_image
can accept any of the args supplied by images.build from
docker-py
. The
--ssh
flag appears to only work with BuildKit enabled, but
docker-py
doesn’t have BuildKit support, so it may not be an available option. Passing additional arguments to the Docker worker may require modifying the code. Feel free to open an issue on
prefect-docker
so we can investigate it.
g

Geoffrey Keating

08/15/2023, 8:25 PM
Thanks, Alex. Maybe I could run my own build shell script and then use
prefect-docker
to push?
a

alex

08/15/2023, 8:27 PM
Yep, that should definitely be possible as long as you have your own Dockerfile!
🙌 1
g

Geoffrey Keating

08/15/2023, 8:27 PM
I'm taking a look about the
ipc_mode
argument, I think it could be added in. Thanks!