Skip to content

Instantly share code, notes, and snippets.

@no1xsyzy
Last active May 19, 2021 06:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save no1xsyzy/c4c291d32dfc94693f0d7d2f0ea4544e to your computer and use it in GitHub Desktop.
Save no1xsyzy/c4c291d32dfc94693f0d7d2f0ea4544e to your computer and use it in GitHub Desktop.
FROM python:slim
RUN pip install -U pip && \
apt-get update && \
apt install -y curl && \
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python - && \
export PATH="${PATH}:/root/.poetry/bin" && \
poetry config virtualenvs.create false && \
rm -rf /var/lib/apt/lists/*
ENTRYPOINT ["/root/.poetry/bin/poetry", "run"]
# should save as poetry image here
WORKDIR /app
COPY . .
RUN poetry install --no-interaction --no-ansi --no-dev
EXPOSE 5000
CMD ["gunicorn", "app:create_app()"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment