https://prefect.io logo
Title
t

Tarek

06/08/2022, 7:44 AM
hi, i managed to run local agent in docker container + my app and services in docker container two..i was trying to put the creation of the tenant
prefect server create-tenant --name default --slug default
in the dockerfile of my app, it doesn't work. why do other users have to install prefect locally outside the containers and run the command there. no way to have the command somewhere in the docker images?
1
m

Marcin Grzybowski

06/08/2022, 8:19 AM
afaik prefect1.0 uses docker-compose to run job? so if prefect was installed inside container it would need a way to run commands (docker-compose, other docker related commands) on a host, and that is probably not a reasonable solution
:thank-you: 1
t

Tarek

06/08/2022, 8:25 AM
i use smiliar setup as the proposed docker-compose here : https://github.com/flavienbwk/prefect-docker-compose
m

Marcin Grzybowski

06/08/2022, 8:33 AM
this solution still requires installing prefect on a host, or running docker in docker? doesn't it ?
👍 1
t

Tarek

06/08/2022, 9:27 AM
it has two ways docker in docker and run agent locally in docker, i use the latest..but i don t know why installing prefect in host is needed
a

Anna Geller

06/08/2022, 11:47 AM
indeed @Tarek you risk running docker in docker unless you run your agent in the same network - by default it uses
prefect-server
docker network - check this
also Tarek, you may consider Prefect 2.0 at this point instead of starting with Server now https://discourse.prefect.io/t/should-i-start-with-prefect-2-0-orion-skipping-prefect-1-0/544
👍 1