Skip to content

Commit 72df375

Browse files
s373nZShahanaFarooqui
authored andcommitted
chore(docker): Update support for Poetry v2.0.0.
- Install `poetry-plugin-export` as a separate step. - Remove `--no-update` option from `poetry lock` as it's now default behavior. - Add `poetry lock` to the command chain after removing cln-rest and wss-proxy. https://github.com/python-poetry/poetry/releases/tag/2.0.0
1 parent 8a0771d commit 72df375

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

Dockerfile

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ RUN apt-get update -qq && \
9191

9292
ENV PATH="/root/.local/bin:$PATH" \
9393
PYTHON_VERSION=3
94-
RUN curl -sSL https://install.python-poetry.org | python3 -
94+
RUN curl -sSL https://install.python-poetry.org | python3 - && \
95+
poetry self add poetry-plugin-export
9596
RUN mkdir -p /root/.venvs && \
9697
python3 -m venv /root/.venvs/cln && \
9798
. /root/.venvs/cln/bin/activate && \
@@ -107,7 +108,9 @@ RUN git clone --recursive /tmp/lightning . && \
107108
git checkout $(git --work-tree=/tmp/lightning --git-dir=/tmp/lightning/.git rev-parse HEAD)
108109

109110
# Do not build python plugins (clnrest & wss-proxy) here, python doesn't support cross compilation.
110-
RUN sed -i '/^clnrest\|^wss-proxy/d' pyproject.toml && poetry export -o requirements.txt --without-hashes
111+
RUN sed -i '/^clnrest\|^wss-proxy/d' pyproject.toml && \
112+
poetry lock && \
113+
poetry export -o requirements.txt --without-hashes
111114
RUN mkdir -p /root/.venvs && \
112115
python3 -m venv /root/.venvs/cln && \
113116
. /root/.venvs/cln/bin/activate && \
@@ -228,8 +231,8 @@ RUN ( ! [ "${target_host}" = "arm-linux-gnueabihf" ] ) || \
228231

229232
# Ensure that the desired grpcio-tools & protobuf versions are installed
230233
# https://github.com/ElementsProject/lightning/pull/7376#issuecomment-2161102381
231-
RUN poetry lock --no-update && poetry install
232-
RUN poetry self add poetry-plugin-export
234+
RUN poetry lock && poetry install && \
235+
poetry self add poetry-plugin-export
233236

234237
# Ensure that git differences are removed before making bineries, to avoid `-modded` suffix
235238
# poetry.lock changed due to pyln-client, pyln-proto and pyln-testing version updates

0 commit comments

Comments
 (0)