Skip to content

Instantly share code, notes, and snippets.

@seahrh
Created April 6, 2020 04:05
Show Gist options
  • Save seahrh/7354c42ae2877ae6717eeb34c5deebc9 to your computer and use it in GitHub Desktop.
Save seahrh/7354c42ae2877ae6717eeb34c5deebc9 to your computer and use it in GitHub Desktop.
fastapi Dockerfile
FROM tiangolo/uvicorn-gunicorn-fastapi:python3.7
WORKDIR /app
EXPOSE 80
COPY app app
COPY *.py ./
COPY *.ini ./
RUN python --version \
&& python -m pip install --upgrade pip setuptools wheel \
&& pip install . \
&& pip list
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "80"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment