Dockerfile 467 B

123456789101112131415161718192021
  1. FROM python:3.8-slim
  2. ARG IS_CI
  3. ENV PYTHONUNBUFFERED=1 \
  4. PORT=8080 \
  5. POETRY_VERSION=1.0.5 \
  6. POETRY_VIRTUALENVS_CREATE=false \
  7. PIP_DISABLE_PIP_VERSION_CHECK=on
  8. RUN mkdir /code
  9. WORKDIR /code
  10. RUN apt-get update && apt-get install -y gcc
  11. RUN pip install "poetry==$POETRY_VERSION"
  12. COPY poetry.lock pyproject.toml /code/
  13. RUN poetry install --no-interaction --no-ansi $(test "$IS_CI" = "True" && echo "--no-dev")
  14. EXPOSE 8080
  15. COPY . /code/
  16. CMD ["./bin/start.sh"]