Skip to content

Instantly share code, notes, and snippets.

@cosmic-cortex
Created January 28, 2020 14:15
Show Gist options
  • Save cosmic-cortex/f36c770f8d43a3d0aa397f5c167a6550 to your computer and use it in GitHub Desktop.
Save cosmic-cortex/f36c770f8d43a3d0aa397f5c167a6550 to your computer and use it in GitHub Desktop.
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