Skip to content

Commit

Permalink
alpinized CLN and switch ubuntu to debian
Browse files Browse the repository at this point in the history
  • Loading branch information
1ma committed Jul 11, 2024
1 parent b20cafd commit b39784a
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- { context: "bitcoin", tags: "1maa/bitcoin:v24", dockerfile: "bitcoin/alpine/Dockerfile", build-arg: "BITCOIN_VERSION=24.2" }
- { context: "bitcoin", tags: "1maa/bitcoin:v25", dockerfile: "bitcoin/alpine/Dockerfile", build-arg: "BITCOIN_VERSION=25.2" }
- { context: "bitcoin", tags: "1maa/bitcoin:v26,1maa/bitcoin:latest", dockerfile: "bitcoin/alpine/Dockerfile", cache-tag: "1maa/bitcoin:v26" }
- { context: "core-lightning", tags: "1maa/core-lightning:latest" }
- { context: "core-lightning", tags: "1maa/core-lightning:latest", dockerfile: "core-lightning/debian/Dockerfile" }
- { context: "electrs", tags: "1maa/electrs:latest" }
- { context: "erlang", tags: "1maa/erlang:24-alpine", build-arg: "ERLANG_VERSION=24.3.4.17" }
- { context: "erlang", tags: "1maa/erlang:25-alpine", build-arg: "ERLANG_VERSION=25.3.2.13" }
Expand Down
59 changes: 59 additions & 0 deletions core-lightning/alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
FROM alpine:3.20 AS builder

ARG CLN_VERSION=v24.05

RUN apk add --no-cache \
autoconf \
automake \
build-base \
ca-certificates \
gettext \
git \
gnupg \
jq \
libpq-dev \
libtool \
py3-pip \
py3-setuptools \
sqlite-dev \
sqlite-static \
zlib-dev \
zlib-static

RUN pip install --break-system-packages \
grpcio-tools \
mako

WORKDIR /tmp

COPY developer_pubkeys.pem .

RUN git clone --depth 1 --branch ${CLN_VERSION} --recurse-submodules https://github.com/ElementsProject/lightning.git

WORKDIR /tmp/lightning

RUN gpg --import /tmp/developer_pubkeys.pem \
&& git verify-tag "${CLN_VERSION}"

ENV LDFLAGS="-s"

RUN ./configure \
--disable-rust \
--enable-static

RUN make -j$(nproc) \
&& git checkout -- .

RUN make install


FROM alpine:3.20

RUN apk add --no-cache \
libgcc \
libpq

COPY --from=builder /usr/local/bin /usr/local/bin
COPY --from=builder /usr/local/libexec /usr/local/libexec

CMD ["/usr/local/bin/lightningd"]
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:24.04 AS builder
FROM debian:12-slim AS builder

ARG CLN_VERSION=v24.05

Expand Down Expand Up @@ -50,7 +50,7 @@ RUN make -j$(nproc) \
RUN make install


FROM ubuntu:24.04
FROM debian:12-slim

COPY --from=builder /usr/local/bin /usr/local/bin
COPY --from=builder /usr/local/libexec /usr/local/libexec
Expand Down

0 comments on commit b39784a

Please sign in to comment.