Hi everyone. I tried to set up the docker agent wi...
# prefect-community
Hi everyone. I tried to set up the docker agent with
a while ago and was getting a permission error when trying to access the docker engine. I never got it to work. I'd like to run the Docker Agent inside of a container managed by docker compose. I have a couple of questions about this set up: 1. I am setting the
policy to
Would this be enough to restart the agent if it failed or in case of restart of the host? 2. What is the best way to give the agent access to the docker engine running on the host? Thank you!
@Pedro Machado setting restart to always should handle the case of agent failure or host restart. As for exposing the docker engine you will need to set something on your docker agent. Setting a
to the daemon on your host would probably work (some users have also had to sometimes set
when running the agent inside a container). Take a look around on how to access the host daemon for your given OS as they are all slightly different. I have had success in the past using
Thanks, Josh. This is running on ubuntu. I did some basic tests (trying to access a webserver with curl from the container) but I haven't been able to do it. I'll keep trying but if someone has suggestions, I'd greatly appreciate them. I tried starting the container with network=host, but haven't been able to get that to work yet.