From 3c20cfa4c270f68310ec9bfa837eb2f74c0d29d2 Mon Sep 17 00:00:00 2001 From: Joey Wilhelm Date: Fri, 21 May 2021 12:36:34 -0400 Subject: [PATCH] Install poetry into the base image for use in CI (#5) This will have zero impact on existing CI jobs, and will allow progress to move forward on https://github.com/Sceptre/sceptre/pull/1035 without having to continue ugly attempts at path munging to get poetry working properly. This is the exact approach taken by the base CircleCI Python images: https://github.com/CircleCI-Public/cimg-python/blob/master/Dockerfile.template#L43 --- Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index cf2fbc8..264d9a6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -37,7 +37,7 @@ ARG PYENV_HOME=/home/circleci/.pyenv ENV LANG=C.UTF-8 \ HOME=/home/circleci \ - PATH=$PYENV_HOME/shims:$PYENV_HOME/bin:$PATH + PATH=$PYENV_HOME/shims:$PYENV_HOME/bin:/home/circleci/.poetry/bin:$PATH RUN git clone --depth 1 https://github.com/pyenv/pyenv.git $PYENV_HOME \ && rm -rfv $PYENV_HOME/.git \ @@ -47,4 +47,7 @@ RUN git clone --depth 1 https://github.com/pyenv/pyenv.git $PYENV_HOME \ && pyenv install 3.9.4 \ && pyenv global system 3.6.13 3.7.10 3.8.9 3.9.4 +# Install the latest Poetry +RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python - + CMD ["/bin/sh"]