Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions doppler/config/regtest/cln.conf
Original file line number Diff line number Diff line change
Expand Up @@ -113,5 +113,3 @@ rpc-file-mode=0660

dev-fast-gossip
large-channels
experimental-dual-fund
experimental-offers
1 change: 0 additions & 1 deletion doppler/config/signet/cln.conf
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,3 @@ rpc-file-mode=0660
dev-fast-gossip
large-channels
experimental-dual-fund
experimental-offers
82 changes: 82 additions & 0 deletions eclair_images/Docker.eclair
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@

FROM eclipse-temurin:21-jdk-alpine as BUILD

# Install git to clone the repository
RUN apk add --no-cache git

# Clone the latest master branch from Eclair repository
WORKDIR /usr/repo
RUN git clone https://github.com/ACINQ/eclair.git . && \
git checkout master && \
git pull

# Set up the build directory
WORKDIR /usr/src

# Copy Maven wrapper and configuration files
RUN cp -r /usr/repo/mvnw mvnw
RUN cp -r /usr/repo/.mvn .mvn
RUN cp /usr/repo/pom.xml pom.xml
RUN mkdir -p eclair-core && cp /usr/repo/eclair-core/pom.xml eclair-core/pom.xml
RUN mkdir -p eclair-front && cp /usr/repo/eclair-front/pom.xml eclair-front/pom.xml
RUN mkdir -p eclair-node && cp /usr/repo/eclair-node/pom.xml eclair-node/pom.xml
RUN mkdir -p eclair-node/modules && cp /usr/repo/eclair-node/modules/assembly.xml eclair-node/modules/assembly.xml

# Create dummy source file for dependency fetching
RUN mkdir -p eclair-core/src/main/scala && touch eclair-core/src/main/scala/empty.scala

# Fetch dependencies (this layer will be cached)
RUN ./mvnw install -pl eclair-node -am
RUN ./mvnw clean

# Copy the actual source code
RUN cp -R -f /usr/repo/* .

# Build the project
RUN ./mvnw package -pl eclair-node -am -DskipTests -Dgit.commit.id=master -Dgit.commit.id.abbrev=master

# Runtime stage
FROM eclipse-temurin:21-jre-alpine

WORKDIR /app

# Install runtime dependencies
RUN apk add --no-cache bash jq curl unzip

# Copy eclair-cli executable
COPY --from=BUILD /usr/src/eclair-core/eclair-cli .
RUN chmod +x eclair-cli && mv eclair-cli /sbin/eclair-cli

# Copy the built eclair-node.zip
COPY --from=BUILD /usr/src/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

# Set up environment
ENV ECLAIR_DATADIR=/data
ENV JAVA_OPTS=

RUN mkdir -p "$ECLAIR_DATADIR"

# Add bash completion
RUN curl -SLO https://raw.githubusercontent.com/ACINQ/eclair/master/contrib/eclair-cli.bash-completion \
&& mkdir -p /etc/bash_completion.d \
&& mv eclair-cli.bash-completion /etc/bash_completion.d/ \
&& curl -SLO https://raw.githubusercontent.com/scop/bash-completion/master/bash_completion \
&& mkdir -p /usr/share/bash-completion/ \
&& mv bash_completion /usr/share/bash-completion/

# Copy entrypoint script
COPY docker-entrypoint.sh /entrypoint.sh
RUN chmod a+x /entrypoint.sh

# Copy bashrc for convenience
COPY bashrc /root/.bashrc

VOLUME ["/data"]

# Lightning P2P port and API port
EXPOSE 9735 8080

ENTRYPOINT ["/entrypoint.sh"]

CMD ["eclair-node"]
17 changes: 17 additions & 0 deletions eclair_images/bashrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Set up aliases
alias ll='ls -la'
alias l='ls -l'
alias eclair-cli='/sbin/eclair-cli'

# Set prompt
export PS1='eclair@\h:\w\$ '

# Enable bash completion if available
if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
fi

# Add helpful message
echo "Eclair node container (built from master branch)"
echo "Use 'eclair-cli' to interact with the node"
echo ""
24 changes: 24 additions & 0 deletions eclair_images/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash
set -e

# If the first argument is a flag, assume we want to run eclair-node
if [ "${1:0:1}" = '-' ]; then
set -- eclair-node "$@"
fi

# If running eclair-node, set up the command properly
if [ "$1" = 'eclair-node' ]; then
shift
exec eclair-node/bin/eclair-node.sh \
"-Declair.datadir=${ECLAIR_DATADIR}" \
${JAVA_OPTS} \
"$@"
fi

# If running eclair-cli, just pass through
if [ "$1" = 'eclair-cli' ]; then
exec /sbin/eclair-cli "$@"
fi

# Otherwise, execute whatever command was passed
exec "$@"
13 changes: 11 additions & 2 deletions examples/doppler_files/mutiny_cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,21 @@ Then a docker image with the tag mutinynet/bitcoind should exist when doing this
```
docker images
```
## How to create local docker image of eclair that supports mutiny net signet
```
cd ./eclair_images
docker build -f "./Docker.eclair" -t mutinynet/eclair .
```
Then a docker image with the tag mutinynet/eclair should exist when doing this command:
```
docker images
```
## How to run image locally with doppler
From there, run the following script with doppler:
```
cargo run --bin doppler -- -f "doppler_files/mutiny_cluster/setup.doppler" -l debug -n "signet"
cargo run --bin doppler -- -f "examples/doppler_files/mutiny_cluster/setup.doppler" -l debug -n "signet"
```
And this will create 12 lnd nodes backed by the one mutinynet node all controllable by doppler
And this will create 1 lnd and 1 coreln node backed by the one mutinynet node all controllable by doppler
Once you complete the setup.doppler file, time to go get coffee as it will take some time to download the current state of the signet
Feel free to follow along at: `watch -n 1 tail -n 100 data/bd1/.bitcoin/signet/debug.log`
Aliases for all the nodes can be found at: `scripts/aliases.sh`
57 changes: 7 additions & 50 deletions examples/doppler_files/mutiny_cluster/setup.doppler
Original file line number Diff line number Diff line change
@@ -1,56 +1,13 @@
BITCOIND IMAGE mutiny mutinynet/bitcoind
// To use eclair, need to create custom image
// (waiting for next release to allow for custom signets otherwise)
//ECLAIR IMAGE eclair mutinynet/eclair

BITCOIND_MINER bd1 mutiny

LND lnd1 PAIR bd1
LND lnd2 PAIR bd1
LND lnd3 PAIR bd1
LND lnd4 PAIR bd1
LND lnd5 PAIR bd1
LND lnd6 PAIR bd1
LND lnd7 PAIR bd1
LND lnd8 PAIR bd1
LND lnd9 PAIR bd1
LND lnd10 PAIR bd1
LND lnd11 PAIR bd1
LND lnd12 PAIR bd1
LND lnd13 PAIR bd1
LND lnd14 PAIR bd1
LND lnd15 PAIR bd1
LND lnd16 PAIR bd1
LND lnd17 PAIR bd1
LND lnd18 PAIR bd1
LND lnd19 PAIR bd1
LND lnd20 PAIR bd1
LND lnd21 PAIR bd1
LND lnd22 PAIR bd1
LND lnd23 PAIR bd1
LND lnd24 PAIR bd1
LND lnd25 PAIR bd1
LND lnd26 PAIR bd1
LND lnd27 PAIR bd1
LND lnd28 PAIR bd1
LND lnd29 PAIR bd1
LND lnd30 PAIR bd1
LND lnd31 PAIR bd1
LND lnd32 PAIR bd1
LND lnd33 PAIR bd1
LND lnd34 PAIR bd1
LND lnd35 PAIR bd1
LND lnd36 PAIR bd1
LND lnd37 PAIR bd1
LND lnd38 PAIR bd1
LND lnd39 PAIR bd1
LND lnd40 PAIR bd1
LND lnd41 PAIR bd1
LND lnd42 PAIR bd1
LND lnd43 PAIR bd1
LND lnd44 PAIR bd1
LND lnd45 PAIR bd1
LND lnd46 PAIR bd1
LND lnd47 PAIR bd1
LND lnd48 PAIR bd1
LND lnd49 PAIR bd1
LND lnd50 PAIR bd1
CORELN coreln PAIR bd1
LND lnd PAIR bd1

//ECLAIR eclair PAIR bd1

UP
Loading