docker: Dockerfile fixes after poetry to uv migration
Cargo utilizes `git ls-remote` to resolve git dependencies specified by commit hashes. GitHub only advertises commits that are reachable from branches, tags, or PR references. The `bip353-plugin` was referencing an orphaned commit in the `bitcoin-payment-instructions` dependency that was unreachable through any advertised reference. This can be resolved by installing the tarball release v0.5.0. Changelog-None.
This commit is contained in:
committed by
Rusty Russell
parent
49c2f290f2
commit
9f75c99266
5
Cargo.lock
generated
5
Cargo.lock
generated
@@ -363,8 +363,9 @@ checksum = "0b47c4ab7a93edb0c7198c5535ed9b52b63095f4e9b45279c6736cec4b856baf"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bitcoin-payment-instructions"
|
name = "bitcoin-payment-instructions"
|
||||||
version = "0.4.0"
|
version = "0.5.0"
|
||||||
source = "git+https://github.com/rust-bitcoin/bitcoin-payment-instructions.git?rev=d071ce27734ca13be2471f81abf8699d902c3a10#d071ce27734ca13be2471f81abf8699d902c3a10"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "3f00d509810205bfef492f1d6cefe1e2ac35b5e66675d51642315ddc5cee0e78"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitcoin 0.32.6",
|
"bitcoin 0.32.6",
|
||||||
"dnssec-prover",
|
"dnssec-prover",
|
||||||
|
|||||||
16
Dockerfile
16
Dockerfile
@@ -90,8 +90,6 @@ RUN apt-get update -qq && \
|
|||||||
|
|
||||||
ENV PATH="/root/.local/bin:$PATH" \
|
ENV PATH="/root/.local/bin:$PATH" \
|
||||||
PYTHON_VERSION=3
|
PYTHON_VERSION=3
|
||||||
RUN wget -qO- https://astral.sh/uv/install.sh | sh && \
|
|
||||||
&& uv sync --all-extras --all-groups
|
|
||||||
|
|
||||||
RUN wget -q https://zlib.net/fossils/zlib-1.2.13.tar.gz -O zlib.tar.gz && \
|
RUN wget -q https://zlib.net/fossils/zlib-1.2.13.tar.gz -O zlib.tar.gz && \
|
||||||
wget -q https://www.sqlite.org/2019/sqlite-src-3290000.zip -O sqlite.zip && \
|
wget -q https://www.sqlite.org/2019/sqlite-src-3290000.zip -O sqlite.zip && \
|
||||||
@@ -102,7 +100,9 @@ COPY . /tmp/lightning
|
|||||||
RUN git clone --recursive /tmp/lightning . && \
|
RUN git clone --recursive /tmp/lightning . && \
|
||||||
git checkout $(git --work-tree=/tmp/lightning --git-dir=/tmp/lightning/.git rev-parse HEAD)
|
git checkout $(git --work-tree=/tmp/lightning --git-dir=/tmp/lightning/.git rev-parse HEAD)
|
||||||
|
|
||||||
# Do not build python plugins here, python doesn't support cross compilation.
|
RUN wget -qO- https://astral.sh/uv/install.sh | sh && \
|
||||||
|
uv sync --all-extras --all-groups
|
||||||
|
|
||||||
WORKDIR /
|
WORKDIR /
|
||||||
|
|
||||||
FROM base-builder AS base-builder-linux-amd64
|
FROM base-builder AS base-builder-linux-amd64
|
||||||
@@ -202,6 +202,10 @@ RUN mkdir /var/libpq && cp -a "$(${PG_CONFIG} --libdir)"/libpq.* /var/libpq
|
|||||||
|
|
||||||
ENV RUST_PROFILE=release \
|
ENV RUST_PROFILE=release \
|
||||||
PATH="/root/.cargo/bin:/root/.local/bin:$PATH"
|
PATH="/root/.cargo/bin:/root/.local/bin:$PATH"
|
||||||
|
ENV UV_CACHE_DIR=/tmp/uv-cache
|
||||||
|
ENV CARGO_NET_GIT_FETCH_WITH_CLI=true
|
||||||
|
ENV CARGO_NET_GIT_FETCH_WITH_CLI_ALWAYS=true
|
||||||
|
|
||||||
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y ${RUSTUP_INSTALL_OPTS}
|
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y ${RUSTUP_INSTALL_OPTS}
|
||||||
RUN rustup toolchain install stable --component rustfmt --allow-downgrade
|
RUN rustup toolchain install stable --component rustfmt --allow-downgrade
|
||||||
|
|
||||||
@@ -218,14 +222,11 @@ RUN ( ! [ "${target_host}" = "arm-linux-gnueabihf" ] ) || \
|
|||||||
|
|
||||||
# Ensure that git differences are removed before making bineries, to avoid `-modded` suffix
|
# Ensure that git differences are removed before making bineries, to avoid `-modded` suffix
|
||||||
RUN git reset --hard HEAD
|
RUN git reset --hard HEAD
|
||||||
|
|
||||||
RUN ./configure --prefix=/tmp/lightning_install --enable-static && uv run make install
|
RUN ./configure --prefix=/tmp/lightning_install --enable-static && uv run make install
|
||||||
|
|
||||||
WORKDIR /opt/lightningd
|
WORKDIR /opt/lightningd
|
||||||
RUN echo 'RUSTUP_INSTALL_OPTS="${RUSTUP_INSTALL_OPTS}"' > /tmp/rustup_install_opts.txt
|
RUN echo 'RUSTUP_INSTALL_OPTS="${RUSTUP_INSTALL_OPTS}"' > /tmp/rustup_install_opts.txt
|
||||||
|
|
||||||
# Copy rustup_install_opts.txt file from builder
|
|
||||||
COPY --from=builder /tmp/rustup_install_opts.txt /tmp/rustup_install_opts.txt
|
|
||||||
# Setup ENV $RUSTUP_INSTALL_OPTS for this stage
|
# Setup ENV $RUSTUP_INSTALL_OPTS for this stage
|
||||||
RUN export $(cat /tmp/rustup_install_opts.txt)
|
RUN export $(cat /tmp/rustup_install_opts.txt)
|
||||||
ENV PATH="/root/.cargo/bin:/root/.venvs/cln/bin:$PATH"
|
ENV PATH="/root/.cargo/bin:/root/.venvs/cln/bin:$PATH"
|
||||||
@@ -241,7 +242,7 @@ RUN apt-get update && \
|
|||||||
socat \
|
socat \
|
||||||
inotify-tools \
|
inotify-tools \
|
||||||
jq \
|
jq \
|
||||||
python3 \
|
python3 && \
|
||||||
apt-get clean && \
|
apt-get clean && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
@@ -262,7 +263,6 @@ RUN --mount=type=bind,from=builder,source=/var/libpq,target=/var/libpq,rw \
|
|||||||
ldconfig
|
ldconfig
|
||||||
|
|
||||||
COPY --from=builder /tmp/lightning_install/ /usr/local/
|
COPY --from=builder /tmp/lightning_install/ /usr/local/
|
||||||
COPY --from=builder-python /root/.venvs/cln/lib/python3.11/site-packages /usr/local/lib/python3.11/dist-packages/
|
|
||||||
COPY --from=downloader /opt/bitcoin/bin /usr/bin
|
COPY --from=downloader /opt/bitcoin/bin /usr/bin
|
||||||
COPY --from=downloader /opt/litecoin/bin /usr/bin
|
COPY --from=downloader /opt/litecoin/bin /usr/bin
|
||||||
COPY tools/docker-entrypoint.sh entrypoint.sh
|
COPY tools/docker-entrypoint.sh entrypoint.sh
|
||||||
|
|||||||
@@ -19,9 +19,7 @@ log-panics = "2"
|
|||||||
|
|
||||||
cln-plugin = { version = "0.5", path = "../../plugins" }
|
cln-plugin = { version = "0.5", path = "../../plugins" }
|
||||||
|
|
||||||
bitcoin-payment-instructions = { git = "https://github.com/rust-bitcoin/bitcoin-payment-instructions.git", rev = "d071ce27734ca13be2471f81abf8699d902c3a10", features = [
|
bitcoin-payment-instructions = { version = "0.5.0", features = ["http"] }
|
||||||
"http",
|
|
||||||
] }
|
|
||||||
|
|
||||||
reqwest = { version = "0.11", default-features = false, features = [
|
reqwest = { version = "0.11", default-features = false, features = [
|
||||||
"rustls-tls",
|
"rustls-tls",
|
||||||
|
|||||||
Reference in New Issue
Block a user