fix: runs in dkrfile & tstng.yml, md fmt err, rm distutils, time delay

This commit is contained in:
Jovial Joe Jayarson
2022-02-26 13:19:59 +05:30
parent 88979b6b3c
commit 9915bc091b
3 changed files with 39 additions and 15 deletions

View File

@@ -1,4 +1,4 @@
FROM python:3.10.2-slim-bullseye as base
FROM python:3.10.2-slim-bullseye
ENV PYTHONFAULTHANDLER=1 \
PYTHONUNBUFFERED=1 \
@@ -11,12 +11,9 @@ ENV PYTHONFAULTHANDLER=1 \
# poetry:
POETRY_VERSION=1.1.13 \
POETRY_NO_INTERACTION=1 \
POETRY_VIRTUALENVS_CREATE=false \
POETRY_CACHE_DIR='/var/cache/pypoetry' \
PATH="$PATH:/root/.local/bin"
WORKDIR /src
# install poetry
# RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -
RUN pip install pipx
@@ -24,9 +21,9 @@ RUN pipx install "poetry==$POETRY_VERSION"
RUN pipx ensurepath
# install dependencies
COPY pyproject.toml poetry.lock /src/
COPY pyproject.toml poetry.lock /
RUN poetry install --no-dev --no-root --no-interaction --no-ansi
# copy and run program
COPY main.py /src/
CMD [ "python", "/src/main.py" ]
ADD main.py /main.py
CMD [ "poetry", "run", "python", "/main.py" ]