-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
54 lines (42 loc) · 1.61 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Base image for building
FROM rust:1.82.0 as builder
# Install dependencies and tools
RUN apt-get update && apt-get install -y \
git \
dpkg \
&& rm -rf /var/lib/apt/lists/*
# Build BDK
RUN git clone https://github.com/bitcoindevkit/bdk.git /bdk
WORKDIR /bdk
RUN cargo build --release
# Build Nostr
RUN git clone https://github.com/rust-nostr/nostr.git /nostr
WORKDIR /nostr
RUN cargo build --release
# Build DLC
RUN git clone https://github.com/p2pderivaives/rust-dlc.git /dlc
WORKDIR /dlc
RUN cargo build --release
# Build Lightning
RUN git clone https://github.com/lightningdevkit/rust-lightning.git /lightning
WORKDIR /lightning
RUN cargo build --release
# Install Lightning-Lending project
RUN git clone https://github.com/Arealayer/Lightning-Lending.git /Lightning-Lending
WORKDIR /Lightning-Lending
# Install cargo-deb to create .deb package
RUN cargo install cargo-deb
# Build the .deb package
RUN cargo deb
# Install the Lightning-Lending .deb package
RUN dpkg -i /Lightning-Lending/target/debian/lightning-lending_0.1.0_amd64.deb
# Final image
FROM debian:bullseye-slim
# Copy the compiled binaries from the builder stage
COPY --from=builder /bdk/target/release/bdk /usr/local/bin/bdk
COPY --from=builder /nostr/target/release/nostr /usr/local/bin/nostr
COPY --from=builder /dlc/target/release/dlc /usr/local/bin/dlc
COPY --from=builder /lightning/target/release/lightning /usr/local/bin/lightning
COPY --from=builder /Lightning-Lending/target/debian/lightning-lending_0.1.0_amd64.deb /usr/local/bin/lightning-lending
# Set default command (you can change this as per your requirements)
CMD ["lightning-lending"]