Elio
05/10/2022, 10:06 AMKevin Kho
05/10/2022, 10:39 AMprefect agent docker start --volume //var/run/docker.sock:/var/run/docker.sock
but this is normally not a good pattern. Why do you need to do this?Elio
05/10/2022, 12:04 PMAnna Geller
05/10/2022, 1:52 PMElio
05/10/2022, 2:29 PMAnna Geller
05/11/2022, 1:46 PMwe just don't want anything installed outside DockerAs our CTO Chris White often says: "Never say just" 🙂 I understand the sentiment toward containerization but you need to keep in mind that there is no one-size-fits-all way of packaging dependencies. For Prefect Docker agent specifically, it needs to run as an independent process on your machine in order to communicate with your Docker client to spin up Docker containers for a flow run. Think of it this way: you can't install a Docker client (e.g. Docker Desktop) as a Docker container, would you agree? It must be installed and running in order to spin up dockerized workloads. You can think of the Prefect Docker agent as a similar process that needs direct access to your system in order to spin up containerized workloads. To minimize any headaches with dependency management, many Prefect users who use a Docker agent spin up the agent process within a virtual environment.
Elio
05/18/2022, 3:54 PMThink of it this way: you can't install a Docker client (e.g. Docker Desktop) as a Docker container, would you agree?For example, cadvisor (monitoring) talk to the docker daemon via the socket file. So we can run cadvisor to monitor docker containers from a cadvisor container where the docker .sock file is mounted as a volume
Anna Geller
05/18/2022, 4:34 PM