Skip to content

Instantly share code, notes, and snippets.

@iamdejan
Last active May 20, 2022 15:33
Show Gist options
  • Save iamdejan/9560ef99d58b8813b1416389cacb2497 to your computer and use it in GitHub Desktop.
Save iamdejan/9560ef99d58b8813b1416389cacb2497 to your computer and use it in GitHub Desktop.
FastAPI Dockerfile
FROM python:3.9.10-slim-bullseye
COPY requirements.txt requirements.txt
RUN pip3 install -r requirements.txt
COPY main.py .
EXPOSE 8000
CMD ["uvicorn", "main:app", "--host", "0.0.0.0"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment