From e843e138fe43c48c6165d860ea99a627945a91a4 Mon Sep 17 00:00:00 2001 From: wailo Date: Mon, 11 Mar 2019 09:51:47 +0100 Subject: [PATCH] Fix installing plugins in dockerfile (#2451) * Improved plugin install in docker - All files generated by 'make install' are copied - Fixes issues with incomplete installation. - Example: New executables created by build but are missing in docker. --- Dockerfile | 7 ++----- README.md | 1 - contrib/linuxarm32v7.Dockerfile | 7 ++----- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index 77ff199ce..8b0d2bbeb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -61,7 +61,7 @@ RUN git clone --recursive /tmp/lightning . && \ git checkout $(git --work-tree=/tmp/lightning --git-dir=/tmp/lightning/.git rev-parse HEAD) ARG DEVELOPER=0 -RUN ./configure && make -j3 DEVELOPER=${DEVELOPER} && cp lightningd/lightning* cli/lightning-cli /usr/bin/ +RUN ./configure --prefix=/tmp/lightning_install && make -j3 DEVELOPER=${DEVELOPER} && make install FROM alpine:3.7 @@ -93,10 +93,7 @@ ENV LIGHTNINGD_DATA=/root/.lightning ENV LIGHTNINGD_RPC_PORT=9835 VOLUME [ "/root/.lightning" ] - -COPY --from=builder /opt/lightningd/cli/lightning-cli /usr/bin -COPY --from=builder /opt/lightningd/lightningd/lightning* /usr/bin/ -COPY --from=builder /opt/lightningd/plugins/pay /usr/libexec/c-lightning/plugins/ +COPY --from=builder /tmp/lightning_install/ /usr/local/ COPY --from=builder /opt/bitcoin/bin /usr/bin COPY --from=builder /opt/litecoin/bin /usr/bin COPY tools/docker-entrypoint.sh entrypoint.sh diff --git a/README.md b/README.md index ac00d060a..14d1cdbb4 100644 --- a/README.md +++ b/README.md @@ -103,7 +103,6 @@ services: - --bitcoin-rpcconnect=bitcoind - --bitcoin-rpcuser=rpcuser - --bitcoin-rpcpassword=rpcpass - - --plugin-dir=/usr/libexec/c-lightning/plugins - --network=testnet - --alias=myawesomenode - --log-level=debug diff --git a/contrib/linuxarm32v7.Dockerfile b/contrib/linuxarm32v7.Dockerfile index 60405e1bc..818f1244d 100644 --- a/contrib/linuxarm32v7.Dockerfile +++ b/contrib/linuxarm32v7.Dockerfile @@ -87,7 +87,7 @@ RUN git clone --recursive /tmp/lightning . && \ git checkout $(git --work-tree=/tmp/lightning --git-dir=/tmp/lightning/.git rev-parse HEAD) ARG DEVELOPER=0 -RUN ./configure --enable-static && make -j3 DEVELOPER=${DEVELOPER} && cp lightningd/lightning* cli/lightning-cli /usr/bin/ +RUN ./configure --prefix=/tmp/lightning_install --enable-static && make -j3 DEVELOPER=${DEVELOPER} && make install FROM arm32v7/debian:stretch-slim as final COPY --from=downloader /usr/bin/qemu-arm-static /usr/bin/qemu-arm-static @@ -100,10 +100,7 @@ ENV LIGHTNINGD_PORT=9835 RUN mkdir $LIGHTNINGD_DATA && \ touch $LIGHTNINGD_DATA/config VOLUME [ "/root/.lightning" ] - -COPY --from=builder /opt/lightningd/cli/lightning-cli /usr/bin -COPY --from=builder /opt/lightningd/lightningd/lightning* /usr/bin/ -COPY --from=builder /opt/lightningd/plugins/pay /usr/libexec/c-lightning/plugins/ +COPY --from=builder /tmp/lightning_install/ /usr/local/ COPY --from=downloader /opt/bitcoin/bin /usr/bin COPY --from=downloader /opt/litecoin/bin /usr/bin COPY tools/docker-entrypoint.sh entrypoint.sh