From 214a5c42c783ad72ee18f064c8ee6f6c053a2ba0 Mon Sep 17 00:00:00 2001 From: Andrea Date: Thu, 4 Jul 2019 10:37:40 +0200 Subject: [PATCH 1/3] Add eclair-cli to eclair's docker image --- Dockerfile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Dockerfile b/Dockerfile index 4f8f2a2f29..6b13e8cab5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -44,6 +44,14 @@ RUN mvn package -pl eclair-node -am -DskipTests -Dgit.commit.id=notag -Dgit.comm # We currently use a debian image for runtime because of some jni-related issue with sqlite FROM openjdk:8u181-jre-slim WORKDIR /app + +# install jq for eclair-cli +RUN apt-get update && apt-get install -y bash jq + +# copy and install eclair-cli executable +COPY --from=BUILD /usr/src/eclair-core/eclair-cli . +RUN chmod +x eclair-cli && mv eclair-cli /sbin/eclair-cli + # Eclair only needs the eclair-node-*.jar to run COPY --from=BUILD /usr/src/eclair-node/target/eclair-node-*.jar . RUN ln `ls` eclair-node.jar From 997dc72dedec17c48381e1441d6aaa17a59257d7 Mon Sep 17 00:00:00 2001 From: Andrea Date: Thu, 4 Jul 2019 10:45:23 +0200 Subject: [PATCH 2/3] Add instructions to use eclair-cli inside the docker container --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index e5c086d723..cf308835b6 100644 --- a/README.md +++ b/README.md @@ -163,6 +163,11 @@ If you want to persist the data directory, you can make the volume to your host docker run -ti --rm -v "/path_on_host:/data" -e "JAVA_OPTS=-Declair.printToConsole" acinq/eclair ``` +If you enabled the API you can check the status of eclair using the command line tool: +``` +docker exec eclair-cli -p foobar getinfo +``` + ## Plugins For advanced usage, Eclair supports plugins written in Scala, Java, or any JVM-compatible language. From f290df060ea4413a79eff7061539f016be540dce Mon Sep 17 00:00:00 2001 From: Andrea Date: Thu, 4 Jul 2019 14:27:43 +0200 Subject: [PATCH 3/3] Add curl to docker eclair image --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 6b13e8cab5..475a939822 100644 --- a/Dockerfile +++ b/Dockerfile @@ -46,7 +46,7 @@ FROM openjdk:8u181-jre-slim WORKDIR /app # install jq for eclair-cli -RUN apt-get update && apt-get install -y bash jq +RUN apt-get update && apt-get install -y bash jq curl # copy and install eclair-cli executable COPY --from=BUILD /usr/src/eclair-core/eclair-cli .