Browse Source

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.
issue-2504
wailo 6 years ago
committed by Christian Decker
parent
commit
e843e138fe
  1. 7
      Dockerfile
  2. 1
      README.md
  3. 7
      contrib/linuxarm32v7.Dockerfile

7
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) git checkout $(git --work-tree=/tmp/lightning --git-dir=/tmp/lightning/.git rev-parse HEAD)
ARG DEVELOPER=0 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 FROM alpine:3.7
@ -93,10 +93,7 @@ ENV LIGHTNINGD_DATA=/root/.lightning
ENV LIGHTNINGD_RPC_PORT=9835 ENV LIGHTNINGD_RPC_PORT=9835
VOLUME [ "/root/.lightning" ] VOLUME [ "/root/.lightning" ]
COPY --from=builder /tmp/lightning_install/ /usr/local/
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 /opt/bitcoin/bin /usr/bin COPY --from=builder /opt/bitcoin/bin /usr/bin
COPY --from=builder /opt/litecoin/bin /usr/bin COPY --from=builder /opt/litecoin/bin /usr/bin
COPY tools/docker-entrypoint.sh entrypoint.sh COPY tools/docker-entrypoint.sh entrypoint.sh

1
README.md

@ -103,7 +103,6 @@ services:
- --bitcoin-rpcconnect=bitcoind - --bitcoin-rpcconnect=bitcoind
- --bitcoin-rpcuser=rpcuser - --bitcoin-rpcuser=rpcuser
- --bitcoin-rpcpassword=rpcpass - --bitcoin-rpcpassword=rpcpass
- --plugin-dir=/usr/libexec/c-lightning/plugins
- --network=testnet - --network=testnet
- --alias=myawesomenode - --alias=myawesomenode
- --log-level=debug - --log-level=debug

7
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) git checkout $(git --work-tree=/tmp/lightning --git-dir=/tmp/lightning/.git rev-parse HEAD)
ARG DEVELOPER=0 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 FROM arm32v7/debian:stretch-slim as final
COPY --from=downloader /usr/bin/qemu-arm-static /usr/bin/qemu-arm-static 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 && \ RUN mkdir $LIGHTNINGD_DATA && \
touch $LIGHTNINGD_DATA/config touch $LIGHTNINGD_DATA/config
VOLUME [ "/root/.lightning" ] VOLUME [ "/root/.lightning" ]
COPY --from=builder /tmp/lightning_install/ /usr/local/
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=downloader /opt/bitcoin/bin /usr/bin COPY --from=downloader /opt/bitcoin/bin /usr/bin
COPY --from=downloader /opt/litecoin/bin /usr/bin COPY --from=downloader /opt/litecoin/bin /usr/bin
COPY tools/docker-entrypoint.sh entrypoint.sh COPY tools/docker-entrypoint.sh entrypoint.sh

Loading…
Cancel
Save