https://prefect.io logo
Title
m

Michael W

08/04/2022, 1:22 AM
please help, prefect 2, when I try to run on a docker container
prefect cloud login --key...
it shows the following:
m

Mason Menges

08/04/2022, 3:25 PM
Hey @Michael W Were you able to get this sorted out? I wasn't able to reproduce this with a docker container running on my local machine. Do you know what version of prefect is running in the container? Also where is the container running is it locally or through another service, i.e ecs?
m

Michael W

08/04/2022, 3:36 PM
container is local, prefect version 2.0.2, I tried both python9 and 10. Thanks for the help
I am able to ping api.prefect.cloud from container's terminal
m

Mason Menges

08/04/2022, 3:44 PM
hmm can you try setting the PREFECT_API_URL and PREFECT_API_KEY manually in the container, this is technically what the cloud login command is doing. something like this
prefect config set PREFECT_API_URL="<https://api.prefect.cloud/api/accounts/xxxxxxxxxxxxxxxxxxxxxxxxxxxx/workspaces/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>"

prefect config set PREFECT_API_KEY="xxx_xxxxxxxxxxxxx"
with the account id and workspace in the URL as well