Some checks failed
Coverage (Nightly) / Build with Coverage (push) Has been cancelled
Repro Build Nightly / Ubuntu repro build: focal (push) Has been cancelled
Repro Build Nightly / Ubuntu repro build: jammy (push) Has been cancelled
Repro Build Nightly / Ubuntu repro build: noble (push) Has been cancelled
Python API Docs (Nightly) / Generate Python API Documentation (push) Has been cancelled
Documentation (Nightly) / Generate Project Documentation (push) Has been cancelled
Publish Documentation Site / Generate Coverage Reports (push) Has been cancelled
Publish Documentation Site / Generate Python API Documentation (push) Has been cancelled
Publish Documentation Site / Generate Project Documentation (push) Has been cancelled
Coverage (Nightly) / Test (postgres) (push) Has been cancelled
Coverage (Nightly) / Test (sqlite) (push) Has been cancelled
Coverage (Nightly) / Generate Coverage Report (push) Has been cancelled
Publish Documentation Site / Deploy to GitHub Pages (push) Has been cancelled
- Dockerfile.palladium-lightning: multi-stage build (ubuntu:22.04) builder stage compiles lightningd from source with git submodules; runtime stage copies palladium-cli from palladium-node:local image (no Rust plugins, no cross-compilation, amd64 only) - docker-compose.lightning.yml: joins external `palladium-net`, exposes port 9735 (P2P), connects to palladiumd:2332 via RPC using credentials from .env - .env.example: template for PALLADIUM_RPCUSER / PALLADIUM_RPCPASSWORD - .gitignore: add .env to prevent accidental credential commits
99 lines
3.3 KiB
Docker
99 lines
3.3 KiB
Docker
# syntax=docker/dockerfile:1.7-labs
|
|
# Palladium Lightning — production image (amd64, no cross-compilation, no Rust plugins)
|
|
|
|
# ──────────────────────────────────────────────────────────────────────────────
|
|
# Stage 1: builder
|
|
# ──────────────────────────────────────────────────────────────────────────────
|
|
FROM ubuntu:22.04 AS builder
|
|
|
|
SHELL ["/bin/bash", "-euo", "pipefail", "-c"]
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
RUN apt-get update && \
|
|
apt-get install -y --no-install-recommends \
|
|
autoconf \
|
|
automake \
|
|
build-essential \
|
|
ca-certificates \
|
|
gcc \
|
|
git \
|
|
gettext \
|
|
jq \
|
|
libffi-dev \
|
|
libicu-dev \
|
|
libprotobuf-c-dev \
|
|
libsodium-dev \
|
|
libsqlite3-dev \
|
|
libssl-dev \
|
|
libtool \
|
|
pkg-config \
|
|
protobuf-compiler \
|
|
python3-dev \
|
|
zlib1g-dev && \
|
|
apt-get clean && rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /opt/lightningd
|
|
|
|
# Copy source (excluding .git, added back below for submodule init)
|
|
COPY --exclude=.git/ . .
|
|
COPY .git/ .git/
|
|
|
|
RUN git submodule update --init --recursive --depth 1 --jobs "$(nproc)"
|
|
|
|
RUN ./configure \
|
|
--prefix=/tmp/lightning_install \
|
|
--disable-valgrind \
|
|
--disable-compat
|
|
|
|
RUN make install-program -j"$(nproc)"
|
|
|
|
# Strip debug symbols to reduce image size
|
|
RUN find /tmp/lightning_install -type f -executable \
|
|
-exec sh -c 'file "$1" | grep -q ELF && strip --strip-unneeded "$1"' _ {} \;
|
|
|
|
|
|
# ──────────────────────────────────────────────────────────────────────────────
|
|
# Stage 2: runtime
|
|
# ──────────────────────────────────────────────────────────────────────────────
|
|
FROM ubuntu:22.04 AS lightningd
|
|
|
|
SHELL ["/bin/bash", "-euo", "pipefail", "-c"]
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
RUN apt-get update && \
|
|
apt-get install -y --no-install-recommends \
|
|
ca-certificates \
|
|
inotify-tools \
|
|
jq \
|
|
libffi8 \
|
|
libicu70 \
|
|
libsodium23 \
|
|
libsqlite3-0 \
|
|
socat && \
|
|
apt-get clean && rm -rf /var/lib/apt/lists/*
|
|
|
|
# palladium-cli is needed by the bcli plugin to talk to palladiumd.
|
|
# Copy it from the already-built palladium-node image so we don't duplicate binaries.
|
|
# Build palladium-node:local first: docker compose -f docker-compose.yml build
|
|
COPY --from=palladium-node:local /usr/local/bin/palladium-cli /usr/local/bin/palladium-cli
|
|
|
|
# Lightning binaries and plugins
|
|
COPY --from=builder /tmp/lightning_install/ /usr/local/
|
|
|
|
COPY tools/docker-entrypoint.sh /entrypoint.sh
|
|
RUN chmod +x /entrypoint.sh
|
|
|
|
ENV LIGHTNINGD_DATA=/root/.lightning
|
|
ENV LIGHTNINGD_NETWORK=palladium
|
|
ENV LIGHTNINGD_PORT=9735
|
|
ENV LIGHTNINGD_RPC_PORT=9835
|
|
ENV EXPOSE_TCP=false
|
|
|
|
EXPOSE 9735
|
|
|
|
VOLUME ["/root/.lightning"]
|
|
|
|
ENTRYPOINT ["/entrypoint.sh"]
|