Skip to content
Merged
2 changes: 1 addition & 1 deletion docker-compose-testnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ services:
- ./config-testnet/bitcoin/bitcoin.conf:/opt/bitcoin/.bitcoin/bitcoin.conf

litecoin:
image: flarefoundation/litecoin:0.21.3
image: flarefoundation/litecoin:0.21.4
restart: on-failure:3
environment:
- TZ=Europe/London
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ services:
- ./config/bitcoin/bitcoin.conf:/opt/bitcoin/.bitcoin/bitcoin.conf

litecoin:
image: flarefoundation/litecoin:0.21.3
image: flarefoundation/litecoin:0.21.4
restart: on-failure:3
environment:
- TZ=Europe/London
Expand Down
92 changes: 30 additions & 62 deletions images/litecoind/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,90 +1,58 @@
# syntax=docker/dockerfile:1.3-labs
FROM ubuntu:22.04 as build
FROM debian:12@sha256:b6507e340c43553136f5078284c8c68d86ec8262b1724dde73c325e8d3dcdeba as build

ARG VERSION=v0.21.3
ARG VERSION=v0.21.4

ENV DEBIAN_FRONTEND="noninteractive" TZ="Europe/London"

# Remove libdb++-dev after upstream fixes the problem with --disable-wallet requiring it
RUN <<-EOF
apt-get -y update && \
apt-get -y install software-properties-common && \
add-apt-repository universe && \
set -e
apt-get -y update && \
apt-get -y install \
git \
build-essential \
libtool \
autotools-dev \
automake \
pkg-config \
bsdmainutils \
python3 \
python3-pip \
libevent-dev \
libboost-system-dev \
libboost-filesystem-dev \
libboost-chrono-dev \
libboost-test-dev \
libboost-thread-dev \
libssl-dev \
libuv1-dev \
libzmq3-dev \
acl \
libfmt-dev \
libdb++-dev
EOF

RUN <<-EOF
echo "* soft nofile 1048576" >> /etc/security/limits.conf && \
echo "* hard nofile 1048576" >> /etc/security/limits.conf && \
echo "{{ ops_user }} soft nofile 1048576" >> /etc/security/limits.conf && \
echo "{{ ops_user }} hard nofile 1048576" >> /etc/security/limits.conf && \
cat /etc/security/limits.conf && \
ulimit -Sn
libdb++-dev \
curl \
cmake
EOF

RUN pip install --upgrade pip && pip3 install pexpect

RUN git clone --single-branch --branch "${VERSION}" https://github.com/litecoin-project/litecoin.git /opt/litecoin

WORKDIR /opt/litecoin

# Define PTHREAD_STACK_MIN to avoid build failure with Boost 1.70.0 libraries
# https://github.com/boostorg/thread/pull/297/commits/74fb0a26099bc51d717f5f154b37231ce7df3e98
# CXXFLAGS and CPPFLAGS can be removed if upstream ever updates Boost to 1.73.0 or newer
RUN <<-EOF
bash ./autogen.sh && \
bash ./configure --disable-wallet --without-gui --disable-tests --disable-bench --prefix=/opt/litecoin/build && \
echo $(getconf _NPROCESSORS_ONLN) && \
make -j $(getconf _NPROCESSORS_ONLN) && \
set -e
make -C /opt/litecoin/depends/ -j $(getconf _NPROCESSORS_ONLN) NO_QT=1 NO_QR=1 NO_WALLET=1 NO_BDB=1 \
boost_cxxflags="-std=c++11 -fvisibility=hidden -DPTHREAD_STACK_MIN=16384" \
boost_cppflags="-DPTHREAD_STACK_MIN=16384"
./autogen.sh
./configure \
--disable-tests \
--disable-bench \
--disable-wallet \
--without-gui \
--prefix=/opt/litecoin/depends/x86_64-pc-linux-gnu/ \
CXXFLAGS="-DPTHREAD_STACK_MIN=16384" \
CPPFLAGS="-DPTHREAD_STACK_MIN=16384"
make -j $(getconf _NPROCESSORS_ONLN)
make install && \
mkdir -p /opt/litecoin/.litecoin/db && \
chmod 755 /opt/litecoin/.litecoin/db
find /opt/litecoin/depends/x86_64-pc-linux-gnu/bin/ -type f -executable -exec strip -s {} + 2>/dev/null || true
EOF

COPY ./litecoin.conf /opt/litecoin/.litecoin/litecoin.conf
COPY litecoin.conf /opt/litecoin/.litecoin/litecoin.conf
RUN mkdir -p /opt/litecoin/.litecoin/db

FROM ubuntu:22.04
COPY --from=build /opt/litecoin/ /opt/litecoin/
FROM gcr.io/distroless/cc-debian12:nonroot@sha256:d1b8e4c52be1111aa108e959ef2a822299bb70fd1819dd250871a2601ca1e4b6 as final

ENV DEBIAN_FRONTEND="noninteractive" TZ="Europe/London"
ENV PATH="/opt/litecoin/build/bin:${PATH}"

RUN <<-EOF
apt-get -y update && \
apt-get -y install \
libevent-dev \
libboost-system-dev \
libboost-filesystem-dev \
libboost-chrono-dev \
libboost-test-dev \
libboost-thread-dev \
libzmq3-dev \
libfmt-dev \
net-tools \
curl \
jq \
netcat
EOF

RUN ls -la /opt/litecoin
COPY --from=build --chown=65532:65532 /opt/litecoin/depends/x86_64-pc-linux-gnu/bin/ /opt/litecoin/bin/
COPY --from=build --chown=65532:65532 /opt/litecoin/.litecoin/ /opt/litecoin/.litecoin/

ENTRYPOINT ["litecoind", "-conf=/opt/litecoin/.litecoin/litecoin.conf", "-datadir=/opt/litecoin/.litecoin/db", "-txindex=1"]
ENTRYPOINT ["/opt/litecoin/bin/litecoind", "-conf=/opt/litecoin/.litecoin/litecoin.conf", "-datadir=/opt/litecoin/.litecoin/db", "-txindex=1"]
89 changes: 0 additions & 89 deletions images/litecoind/Dockerfile-wls

This file was deleted.

2 changes: 1 addition & 1 deletion images/litecoind/build.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
docker buildx build --progress=plain -t flarefoundation/litecoin:0.21.3 .
docker build -t flarefoundation/litecoin:0.21.4 .
1 change: 0 additions & 1 deletion images/litecoind/build_from_local_archive.sh

This file was deleted.