Hello Prefect Team, I’m deploying a flow with the...
# prefect-community
d
Hello Prefect Team, I’m deploying a flow with the Docker infra using the
docker:dind
(docker -in-docker) image. The ideia is to run containers inside the flow using the
docker
sdk. Using the
/var/run/docker.sock
volume is not an alternative for my use case. It seems that the only thing stopping me at this point is that I cannot set the
privileged
flag in the
prefect.infrastructure.DockerContainer
abstraction. As shown in the docker-compose below, it is required for running the
docker:dind
container.
Copy code
services:
  dind:
    image: docker:dind
    privileged: true
Could this option be added to Prefect? Happy new year for everyone 😄
1
If I am not mistaken, prefect uses the method
create_container
of
docker.api.container.ContainerApiMixin
to create the containers. This method accepts the
host_config
argument, which can be set by using the method
create_host_config
of the same class, which accepts the
privileged
argument.
z
Hi! We’re waiting for a design to be proposed to expose host_config options: https://github.com/PrefectHQ/prefect/issues/7301
❤️ 1
d
I had just create an issue for this topic, fell free to close it, since this other issue might include my request: https://github.com/PrefectHQ/prefect/issues/8019
And thanks a lot for the quick response!