Ankit
01/11/2024, 8:15 AMRobin Niel
01/11/2024, 8:18 AMFROM python:3.11
ADD requirements.txt requirements.txt
ADD flows/ flows/
ADD serve_flows.py serve_flows.py
ARG PREFECT_API=<http://localhost:4200>
ENV PREFECT_API_URL=$PREFECT_API
RUN mkdir -p -m 0700 ~/.ssh && ssh-keyscan github.com >> ~/.ssh/known_hosts
RUN --mount=type=ssh pip3 install -r requirements.txt
ADD entrypoint.sh entrypoint.sh
RUN chmod +x entrypoint.sh
CMD ["./entrypoint.sh"]
You have to pass the PREFECT_API variable at building time like this :
docker build -t prefect-agent --build-arg PREFECT_API=<http://you-api-url:4200/api> .
Ankit
01/11/2024, 8:54 AMRobin Niel
01/11/2024, 8:55 AMAnkit
01/11/2024, 8:56 AMRobin Niel
01/11/2024, 8:57 AMAnkit
01/11/2024, 9:18 AMRobin Niel
01/11/2024, 9:18 AMRobin Niel
01/11/2024, 9:18 AM