lndk-org / lndk

MIT License
76 stars 19 forks source link

Bug: failed to select a version for the requirement `clap = "^4.4.6"` #102

Closed mrfelton closed 2 months ago

mrfelton commented 2 months ago

Describe the bug

failed to select a version for the requirementclap = "^4.4.6"``

Environment

To Reproduce

Try building the following Dockerfile:

FROM rust:1.57

# References for lndk
ARG LNDK_REF=0f9b3c291af070ac35641d8b817d8e2ef7b8bbdf

# Set the working directory in the Docker image
WORKDIR /usr/src/lndk

# Grab and install the latest version of lnd and all related dependencies.
RUN git clone --depth=1 https://github.com/lndk-org/lndk.git . \
&& git reset --hard ${LNDK_REF} \
&& cargo build --release
mrfelton commented 2 months ago

Resolved by switching to more recent rust and using debian instead of alpine:

FROM rust:1.78-bookworm

# References for lndk
ARG LNDK_REF=0f9b3c291af070ac35641d8b817d8e2ef7b8bbdf

# Set the working directory in the Docker image
WORKDIR /usr/src/lndk

# Install protobuf-compiler and other dependencies
RUN apt-get update && apt-get install -y protobuf-compiler git

# Grab and install the latest version of lnd and all related dependencies.
RUN git clone --depth=1 https://github.com/lndk-org/lndk.git . \
&& git reset --hard ${LNDK_REF} \
&& cargo build --release