Skip to content

Instantly share code, notes, and snippets.

@cosmic-cortex
Created January 28, 2020 14:15
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Dockerfile for our FastAPI application
FROM ubuntu:19.10
COPY ./api /api/api
COPY requirements.txt /requirements.txt
RUN apt-get update \
&& apt-get install python3-dev python3-pip -y \
&& pip3 install -r requirements.txt
ENV PYTHONPATH=/api
WORKDIR /api
EXPOSE 8000
ENTRYPOINT ["uvicorn"]
CMD ["api.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