Created
October 24, 2019 15:36
-
-
Save austinmcconnell/b3223926b7d2389c02edb200d06df069 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ARG PYTHON_VERSION=3.7.2-alpine | |
FROM python:${PYTHON_VERSION} as base | |
WORKDIR /app | |
RUN apk add --no-cache \ | |
build-base | |
COPY Pipfile Pipfile.lock ./ | |
RUN pip install --no-cache-dir --upgrade pip setuptools pipenv && \ | |
pipenv lock -r > requirements.txt && \ | |
pip wheel --no-cache-dir --wheel-dir /wheels -r requirements.txt | |
FROM python:${PYTHON_VERSION} | |
WORKDIR /app | |
COPY --from=base /wheels /wheels | |
COPY --from=base /app/requirements.txt /app/requirements.txt | |
RUN pip install --no-index --find-links=/wheels -r requirements.txt | |
COPY . . | |
EXPOSE 5000 | |
ENTRYPOINT ["gunicorn", "--config", "gunicorn_config.py", "run:APP"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment