-
-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* lndk-eclair bolt12 test environment * use static certs for lndk dev * move eclair/lndk/cln to wallets profile, force lndk onto x86 platform * fix port conflict --------- Co-authored-by: Keyan <[email protected]> Co-authored-by: k00b <[email protected]>
- Loading branch information
1 parent
bf541aa
commit 5273494
Showing
13 changed files
with
215 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# based on https://github.com/LN-Zap/bolt12-playground | ||
FROM acinq/eclair:0.11.0 | ||
|
||
|
||
ENTRYPOINT JAVA_OPTS="${JAVA_OPTS}" eclair-node/bin/eclair-node.sh "-Declair.datadir=${ECLAIR_DATADIR}" | ||
|
||
################# | ||
# Builder image # | ||
################# | ||
FROM maven:3.8.6-openjdk-11-slim AS builder | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
git \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# References for eclair | ||
ARG ECLAIR_REF=b73a009a1d7d7ea3a158776cd233512b9a538550 | ||
ARG ECLAIR_PLUGINS_REF=cdc26dda96774fdc3b54075df078587574891fb7 | ||
|
||
WORKDIR /usr/src/eclair | ||
RUN git clone https://github.com/ACINQ/eclair.git . \ | ||
&& git reset --hard ${ECLAIR_REF} | ||
RUN mvn install -pl eclair-node -am -DskipTests -Dgit.commit.id=notag -Dgit.commit.id.abbrev=notag | ||
|
||
WORKDIR /usr/src/eclair-plugins | ||
RUN git clone https://github.com/ACINQ/eclair-plugins.git . \ | ||
&& git reset --hard ${ECLAIR_PLUGINS_REF} | ||
WORKDIR /usr/src/eclair-plugins/bolt12-tip-jar | ||
RUN mvn package -DskipTests | ||
|
||
# ############### | ||
# # final image # | ||
# ############### | ||
FROM openjdk:11.0.16-jre-slim-bullseye | ||
WORKDIR /opt | ||
|
||
# Add utils | ||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
bash jq curl unzip \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# copy and install eclair-cli executable | ||
COPY --from=builder /usr/src/eclair/eclair-core/eclair-cli . | ||
RUN chmod +x eclair-cli && mv eclair-cli /sbin/eclair-cli | ||
|
||
# we only need the eclair-node.zip to run | ||
COPY --from=builder /usr/src/eclair/eclair-node/target/eclair-node-*.zip ./eclair-node.zip | ||
RUN unzip eclair-node.zip && mv eclair-node-* eclair-node && chmod +x eclair-node/bin/eclair-node.sh | ||
|
||
# copy and install bolt12-tip-jar plugin | ||
COPY --from=builder /usr/src/eclair-plugins/bolt12-tip-jar/target/bolt12-tip-jar-0.10.1-SNAPSHOT.jar . | ||
|
||
ENV ECLAIR_DATADIR=/data | ||
ENV JAVA_OPTS= | ||
|
||
RUN mkdir -p "$ECLAIR_DATADIR" | ||
VOLUME [ "/data" ] | ||
|
||
ARG LN_NODE_FOR | ||
ENV LN_NODE_FOR=$LN_NODE_FOR | ||
COPY ["./$LN_NODE_FOR/*", "/data"] | ||
|
||
# ENTRYPOINT JAVA_OPTS="${JAVA_OPTS}" eclair-node/bin/eclair-node.sh "-Declair.datadir=${ECLAIR_DATADIR}" | ||
ENTRYPOINT JAVA_OPTS="${JAVA_OPTS}" eclair-node/bin/eclair-node.sh bolt12-tip-jar-0.10.1-SNAPSHOT.jar "-Declair.datadir=${ECLAIR_DATADIR}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
��thC(��Ā��B��qF���`iB�L)L���� |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
6��1>��bgO�嵿��}�k �!sb���� |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sqlite |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# This image uses fedora 40 because the official pre-built lndk binaries require | ||
# glibc 2.39 which is not available on debian or ubuntu images. | ||
FROM fedora:40 | ||
RUN useradd -u 1000 -m lndk | ||
|
||
RUN mkdir -p /home/lndk/.lndk | ||
COPY ["./tls-*", "/home/lndk/.lndk"] | ||
RUN chown 1000:1000 -Rvf /home/lndk/.lndk && \ | ||
chmod 644 /home/lndk/.lndk/tls-cert.pem && \ | ||
chmod 600 /home/lndk/.lndk/tls-key.pem | ||
|
||
USER lndk | ||
RUN curl --proto '=https' --tlsv1.2 -LsSf https://github.com/lndk-org/lndk/releases/download/v0.2.0/lndk-installer.sh | sh | ||
RUN echo 'source /home/lndk/.cargo/env' >> $HOME/.bashrc | ||
WORKDIR /home/lndk | ||
EXPOSE 7000 | ||
ENV PATH="/home/lndk/.cargo/bin:${PATH}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
-----BEGIN CERTIFICATE----- | ||
MIIBaDCCAQ2gAwIBAgIUOms3xZ+pBVUntnFD7J0m7Ll1MZYwCgYIKoZIzj0EAwIw | ||
ITEfMB0GA1UEAwwWcmNnZW4gc2VsZiBzaWduZWQgY2VydDAgFw03NTAxMDEwMDAw | ||
MDBaGA80MDk2MDEwMTAwMDAwMFowITEfMB0GA1UEAwwWcmNnZW4gc2VsZiBzaWdu | ||
ZWQgY2VydDBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABGdu9cXUGSPIycSCbmGb | ||
6/4U+txvE0aSvzsMc+pKFiXlB+P/3x/WxYMxlHB0lh9fTQU8tdViJ2AY/QnHVwUk | ||
O4CjITAfMB0GA1UdEQQWMBSCCWxvY2FsaG9zdIIHc25fbG5kazAKBggqhkjOPQQD | ||
AgNJADBGAiEA78UdPHgdaXVyttqt21+uWTlFn4B6queGL/cmYpQbiIsCIQCwxY0n | ||
x2v5zXEwPU/bOnaQNeq9F8AT+/4lKelHfON/Gw== | ||
-----END CERTIFICATE----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
-----BEGIN PRIVATE KEY----- | ||
MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgTa/r2pnmB05EwKk6 | ||
a4FbigSagGBok+i/ASxkG9iGedWhRANCAARnbvXF1BkjyMnEgm5hm+v+FPrcbxNG | ||
kr87DHPqShYl5Qfj/98f1sWDMZRwdJYfX00FPLXVYidgGP0Jx1cFJDuA | ||
-----END PRIVATE KEY----- |