Skip to content

Commit

Permalink
Use tini as docker entrypoint
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasDorier authored and cdecker committed Mar 19, 2019
1 parent 99adea5 commit 3e21528
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ RUN apk add --no-cache \
inotify-tools \
socat \
bash \
zlib-dev
zlib-dev \
tini

ENV GLIBC_VERSION 2.27-r0
ENV GLIBC_SHA256 938bceae3b83c53e7fa9cc4135ce45e04aae99256c5e74cf186c794b97473bc7
Expand Down Expand Up @@ -99,4 +100,4 @@ COPY --from=builder /opt/litecoin/bin /usr/bin
COPY tools/docker-entrypoint.sh entrypoint.sh

EXPOSE 9735 9835
ENTRYPOINT [ "./entrypoint.sh" ]
ENTRYPOINT [ "/sbin/tini", "-g", "--", "./entrypoint.sh" ]
7 changes: 6 additions & 1 deletion contrib/linuxarm32v7.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ RUN set -ex \

WORKDIR /opt

RUN wget -qO /opt/tini "https://github.com/krallin/tini/releases/download/v0.18.0/tini-armhf" \
&& echo "01b54b934d5f5deb32aa4eb4b0f71d0e76324f4f0237cc262d59376bf2bdc269 /opt/tini" | sha256sum -c - \
&& chmod +x /opt/tini

ARG BITCOIN_VERSION=0.17.0
ENV BITCOIN_TARBALL bitcoin-$BITCOIN_VERSION-arm-linux-gnueabihf.tar.gz
ENV BITCOIN_URL https://bitcoincore.org/bin/bitcoin-core-$BITCOIN_VERSION/$BITCOIN_TARBALL
Expand Down Expand Up @@ -91,6 +95,7 @@ RUN ./configure --prefix=/tmp/lightning_install --enable-static && make -j3 DEVE

FROM arm32v7/debian:stretch-slim as final
COPY --from=downloader /usr/bin/qemu-arm-static /usr/bin/qemu-arm-static
COPY --from=downloader /opt/tini /usr/bin/tini
RUN apt-get update && apt-get install -y --no-install-recommends socat inotify-tools \
&& rm -rf /var/lib/apt/lists/*

Expand All @@ -106,4 +111,4 @@ COPY --from=downloader /opt/litecoin/bin /usr/bin
COPY tools/docker-entrypoint.sh entrypoint.sh

EXPOSE 9735 9835
ENTRYPOINT [ "./entrypoint.sh" ]
ENTRYPOINT [ "/usr/bin/tini", "-g", "--", "./entrypoint.sh" ]

0 comments on commit 3e21528

Please sign in to comment.