Files
lightning/contrib/docker/Dockerfile.alpine
Christian Decker 0acdc911a5 docker: Build the alpine docker image from a clone
This was causing some issues because it was picking up pre-built
artefacts from the host machine. By cloning first we ensure it matches
the latest commit and compiles from scratch.
2022-10-15 13:42:58 +02:00

40 lines
835 B
Docker

FROM alpine:3.16 as builder
LABEL org.opencontainers.image.authors="Vincenzo Palazzo (@vincenzopalazzo) vincenzopalazzodev@gmail.com"
WORKDIR /build
RUN apk update && \
apk add \
alpine-sdk \
autoconf \
automake \
ca-certificates \
cargo \
gettext \
git \
gmp-dev \
libsodium \
libtool \
net-tools \
postgresql-dev \
py3-mako \
python3 \
python3-dev \
sqlite-dev \
sqlite-static \
su-exec \
zlib-dev \
zlib-static
RUN mkdir lightning
COPY . /source
RUN git clone /source /repo --recursive && \
cd /repo && \
./configure --enable-static --prefix=/usr && \
make -j $(nproc) && \
make install
# TODO: review entry point here, to make this availale for the user
CMD ["lightningd", "--version"]