-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathDockerfile
More file actions
121 lines (101 loc) · 3.16 KB
/
Copy pathDockerfile
File metadata and controls
121 lines (101 loc) · 3.16 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# ----------------------------------------------------------------------
# Build layer
# ----------------------------------------------------------------------
FROM debian:bullseye-slim as builder
ENV LIGHTNINGD_VERSION=v24.11.1
ENV DEVELOPER=1
RUN apt update && apt install -y \
autoconf \
automake \
build-essential \
ca-certificates \
curl \
dirmngr \
gettext \
git \
gnupg \
libpq-dev \
postgresql \
libtool \
libffi-dev \
protobuf-compiler \
python3.9 \
python3-dev \
python3-mako \
python3-pip \
python3-venv \
python3-setuptools \
wget \
libgmp3-dev \
libsqlite3-dev \
libssl-dev \
libev-dev \
libevent-dev \
qemu-user-static \
pkg-config \
jq
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
RUN git clone --single-branch --branch ${LIGHTNINGD_VERSION} --recursive https://github.com/ElementsProject/lightning.git
WORKDIR /lightning
RUN pip3 install -U pip
RUN pip3 install -U wheel
RUN . "/root/.cargo/env" \
&& pip3 install cryptography \
&& curl -sSL https://install.python-poetry.org | POETRY_VERSION=1.8.0 python3 - \
&& /root/.local/bin/poetry export --without-hashes -o requirements.txt \
&& pip3 install -r requirements.txt
RUN ./configure --prefix=/tmp/lightning_install --enable-static \
&& make -j3 DEVELOPER=${DEVELOPER} \
&& make install
# ----------------------------------------------------------------------
# CLBOSS
# ----------------------------------------------------------------------
FROM debian:bullseye-slim as clboss
# Let's get v0.13.1
RUN apt update && apt install -y \
build-essential \
pkg-config \
libev-dev \
libcurl4-gnutls-dev \
libsqlite3-dev \
dnsutils \
git \
automake \
autoconf-archive \
libtool \
&& git clone https://github.com/ZmnSCPxj/clboss.git \
&& cd clboss \
&& git checkout v0.13.1 \
&& autoreconf -i \
&& ./configure && make && make install
# ----------------------------------------------------------------------
# FINAL layer
# ----------------------------------------------------------------------
FROM debian:bullseye-slim as final
ENV LIGHTNINGD_DATA=/.lightning
ENV LIGHTNINGD_RPC_PORT=9835
ENV LIGHTNINGD_PORT=9735
ENV LIGHTNINGD_NETWORK=bitcoin
RUN apt-get update && apt-get install -y --no-install-recommends \
socat \
inotify-tools \
python3.9 \
python3-pip \
qemu-user-static \
libpq5 \
curl \
libcurl4-gnutls-dev \
postgresql \
autoconf automake build-essential libffi-dev libtool pkg-config python3-dev \
openssl libssl-dev libev-dev dnsutils \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir $LIGHTNINGD_DATA \
&& touch $LIGHTNINGD_DATA/config
VOLUME ["/.bitcoin", "/.lightning"]
COPY --from=builder /usr/local/lib/python3.9/dist-packages/ /usr/local/lib/python3.9/dist-packages/
COPY --from=builder /tmp/lightning_install/ /usr/local/
COPY --from=builder /lightning/tools/docker-entrypoint.sh entrypoint.sh
COPY --from=clboss /usr/local/bin/clboss /usr/local/bin
COPY --from=cyphernode/bitcoin:v24.0.1-mosquitto-debian /usr/bin/bitcoin-cli /usr/bin
COPY bitcoin.conf /.bitcoin/bitcoin.conf
EXPOSE 9735 9835