From e9004e9040439e426e5de7668e7898242381b3fd Mon Sep 17 00:00:00 2001 From: Dmitry Figol Date: Tue, 14 Jan 2020 07:17:18 +0100 Subject: [PATCH] Update Dockerfile * Update poetry URL * Use a virtual environment to install dependencies, fix #464 * Use slim-buster instead of slim-stretch --- Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5b507255..557e2a30 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,16 +1,16 @@ ARG PYTHON -FROM python:${PYTHON}-slim-stretch +FROM python:${PYTHON}-slim-buster WORKDIR /nornir -ENV PATH="/root/.poetry/bin:$PATH" \ +ENV PATH="/nornir/.venv/bin:/root/.poetry/bin:$PATH" \ PYTHONDONTWRITEBYTECODE=1 \ PYTHONUNBUFFERED=1 \ NORNIR_TESTS=1 RUN apt-get update \ && apt-get install -yq curl git pandoc \ - && curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python \ - && poetry config virtualenvs.create false + && curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python \ + && poetry config virtualenvs.in-project true COPY pyproject.toml . COPY poetry.lock .