Skip to content

Instantly share code, notes, and snippets.

@jgcmarins
Created August 10, 2022 17:39
Show Gist options
  • Save jgcmarins/06728263d6d0e03da9013a7def18e00b to your computer and use it in GitHub Desktop.
Save jgcmarins/06728263d6d0e03da9013a7def18e00b to your computer and use it in GitHub Desktop.
Python Dockerfile with FatAPI
FROM python:3.10
WORKDIR /code
#COPY ./requirements.txt /code/requirements.txt
COPY ./ /code/
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
#COPY ./app /code/app
CMD ["uvicorn", "application.main:app", "--host", "0.0.0.0", "--port", "80"]
# docker build -t my-app .
# docker run -p 0.0.0.0:80:80 -t my-app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment