Elio05/10/2022, 10:06 AM
Kevin Kho05/10/2022, 10:39 AM
but this is normally not a good pattern. Why do you need to do this?
prefect agent docker start --volume //var/run/docker.sock:/var/run/docker.sock
Elio05/10/2022, 12:04 PM
Anna Geller05/10/2022, 1:52 PM
Elio05/10/2022, 2:29 PM
Anna Geller05/11/2022, 1:46 PM
we 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.
Elio05/18/2022, 3:54 PM
Think 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 Geller05/18/2022, 4:34 PM