Matthew Cloney

10/31/2022, 5:23 PM
Hi all! Brand new to Prefect today, I can run it locally without issues but after building with
I'm unable to connect to the UI from my local no matter what I try. I've tried @Cole Murrayā€™s suggestion of mapping port 4200, passing
--network host
, etc. but I'm getting "Empty reply from server" when I try to curl it. This is the full
docker run
command I'm running, TIA for any suggestions!
docker run --rm --name prefect -p 4200:4200 prefecthq/prefect:dev-python3.7 prefect orion start
āœ… 1

Ryan Peden

10/31/2022, 5:32 PM
I believe you'll also need to set the
environment variable to Otherwise it starts up on, which won't be visible outside the container.
So in your case I believe the full command would be
docker run --rm --name prefect --env PREFECT_ORION_API_HOST= -p 4200:4200 prefecthq/prefect:dev-python3.7 prefect orion start
šŸ™Œ 1
I also put together a GitHub repo that shows the same thing with Docker Compose:
šŸ™ 2

Matthew Cloney

10/31/2022, 5:36 PM
Ah perfect, thanks @Ryan Peden! I had a hunch it had to do with getting the webserver to listen on
but wasn't sure of the exact environment variable to pass. Works like a charm, thanks!


11/02/2022, 6:47 PM
You can also set this in the
prefect orion start
command with the
parameter šŸ™‚
šŸ‘ 1