mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-18 22:54:25 +01:00
docker: Install clnrest dependencies from rquirements.txt
Changelog-None
This commit is contained in:
committed by
Rusty Russell
parent
18b928046b
commit
33ab1ce78b
@@ -126,8 +126,7 @@ RUN ./configure --prefix=/tmp/lightning_install --enable-static && \
|
|||||||
make DEVELOPER=${DEVELOPER} && \
|
make DEVELOPER=${DEVELOPER} && \
|
||||||
/root/.local/bin/poetry run make install
|
/root/.local/bin/poetry run make install
|
||||||
|
|
||||||
# RUN pip3 install -r plugins/clnrest/requirements.txt
|
RUN pip3 install -r plugins/clnrest/requirements.txt
|
||||||
RUN pip3 install flask gunicorn json5 flask_restx flask-socketio gevent gevent-websocket
|
|
||||||
RUN pip3 install ./contrib/pyln-client
|
RUN pip3 install ./contrib/pyln-client
|
||||||
|
|
||||||
FROM debian:bullseye-slim as final
|
FROM debian:bullseye-slim as final
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
# * final: Copy the binaries required at runtime
|
# * final: Copy the binaries required at runtime
|
||||||
# The resulting image uploaded to dockerhub will only contain what is needed for runtime.
|
# The resulting image uploaded to dockerhub will only contain what is needed for runtime.
|
||||||
# From the root of the repository, run "docker build -t yourimage:yourtag ."
|
# From the root of the repository, run "docker build -t yourimage:yourtag ."
|
||||||
FROM debian:bullseye-slim as downloader
|
FROM debian:bookworm-slim as downloader
|
||||||
|
|
||||||
RUN set -ex \
|
RUN set -ex \
|
||||||
&& apt-get update \
|
&& apt-get update \
|
||||||
@@ -41,7 +41,7 @@ RUN mkdir /opt/litecoin && cd /opt/litecoin \
|
|||||||
&& tar -xzvf litecoin.tar.gz $BD/litecoin-cli --strip-components=1 --exclude=*-qt \
|
&& tar -xzvf litecoin.tar.gz $BD/litecoin-cli --strip-components=1 --exclude=*-qt \
|
||||||
&& rm litecoin.tar.gz
|
&& rm litecoin.tar.gz
|
||||||
|
|
||||||
FROM debian:bullseye-slim as builder
|
FROM debian:bookworm as builder
|
||||||
|
|
||||||
ENV LIGHTNINGD_VERSION=master
|
ENV LIGHTNINGD_VERSION=master
|
||||||
RUN apt-get update -qq && \
|
RUN apt-get update -qq && \
|
||||||
@@ -52,7 +52,6 @@ RUN apt-get update -qq && \
|
|||||||
ca-certificates \
|
ca-certificates \
|
||||||
curl \
|
curl \
|
||||||
dirmngr \
|
dirmngr \
|
||||||
gcc-10 \
|
|
||||||
gettext \
|
gettext \
|
||||||
git \
|
git \
|
||||||
gnupg \
|
gnupg \
|
||||||
@@ -62,43 +61,27 @@ RUN apt-get update -qq && \
|
|||||||
pkg-config \
|
pkg-config \
|
||||||
libssl-dev \
|
libssl-dev \
|
||||||
protobuf-compiler \
|
protobuf-compiler \
|
||||||
python3.9 \
|
python3 \
|
||||||
python3-dev \
|
python3-dev \
|
||||||
python3-mako \
|
python3-mako \
|
||||||
python3-pip \
|
python3-pip \
|
||||||
python3-venv \
|
python3-venv \
|
||||||
python3-setuptools \
|
python3-setuptools \
|
||||||
|
python3-wheel \
|
||||||
libev-dev \
|
libev-dev \
|
||||||
libevent-dev \
|
libevent-dev \
|
||||||
qemu-user-static \
|
qemu-user-static \
|
||||||
|
zlib1g-dev \
|
||||||
|
zlib1g \
|
||||||
|
unzip \
|
||||||
|
tclsh \
|
||||||
|
sqlite3 \
|
||||||
|
libsqlite3-dev \
|
||||||
|
libgmp-dev \
|
||||||
wget
|
wget
|
||||||
|
|
||||||
ENV PKG_CONFIG_PATH /usr/lib/arm-linux-gnueabihf/pkgconfig
|
|
||||||
|
|
||||||
RUN wget -q https://zlib.net/fossils/zlib-1.2.13.tar.gz \
|
|
||||||
&& tar xvf zlib-1.2.13.tar.gz \
|
|
||||||
&& cd zlib-1.2.13 \
|
|
||||||
&& ./configure \
|
|
||||||
&& make \
|
|
||||||
&& make install && cd .. && \
|
|
||||||
rm zlib-1.2.13.tar.gz && \
|
|
||||||
rm -rf zlib-1.2.13
|
|
||||||
|
|
||||||
RUN apt-get install -y --no-install-recommends unzip tclsh \
|
|
||||||
&& wget -q https://www.sqlite.org/2019/sqlite-src-3290000.zip \
|
|
||||||
&& unzip sqlite-src-3290000.zip \
|
|
||||||
&& cd sqlite-src-3290000 \
|
|
||||||
&& ./configure --enable-static --disable-readline --disable-threadsafe --disable-load-extension \
|
|
||||||
&& make \
|
|
||||||
&& make install && cd .. && rm sqlite-src-3290000.zip && rm -rf sqlite-src-3290000
|
|
||||||
|
|
||||||
USER root
|
USER root
|
||||||
RUN wget -q https://gmplib.org/download/gmp/gmp-6.1.2.tar.xz \
|
ENV PKG_CONFIG_PATH /usr/lib/arm-linux-gnueabihf/pkgconfig
|
||||||
&& tar xvf gmp-6.1.2.tar.xz \
|
|
||||||
&& cd gmp-6.1.2 \
|
|
||||||
&& ./configure --disable-assembly \
|
|
||||||
&& make \
|
|
||||||
&& make install && cd .. && rm gmp-6.1.2.tar.xz && rm -rf gmp-6.1.2
|
|
||||||
|
|
||||||
ENV RUST_PROFILE=release
|
ENV RUST_PROFILE=release
|
||||||
ENV PATH=$PATH:/root/.cargo/bin/
|
ENV PATH=$PATH:/root/.cargo/bin/
|
||||||
@@ -106,33 +89,34 @@ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
|||||||
RUN rustup toolchain install stable --component rustfmt --allow-downgrade
|
RUN rustup toolchain install stable --component rustfmt --allow-downgrade
|
||||||
|
|
||||||
WORKDIR /opt/lightningd
|
WORKDIR /opt/lightningd
|
||||||
COPY . /tmp/lightning
|
COPY . .
|
||||||
|
|
||||||
RUN git clone --recursive /tmp/lightning . && \
|
# RUN git clone --recursive /tmp/lightning . && \
|
||||||
git checkout $(git --work-tree=/tmp/lightning --git-dir=/tmp/lightning/.git rev-parse HEAD)
|
# git checkout $(git --work-tree=/tmp/lightning --git-dir=/tmp/lightning/.git rev-parse HEAD)
|
||||||
|
|
||||||
ARG DEVELOPER=1
|
ARG DEVELOPER=1
|
||||||
ENV PYTHON_VERSION=3
|
ENV PYTHON_VERSION=3
|
||||||
RUN curl -sSL https://install.python-poetry.org | python3 -
|
RUN curl -sSL https://install.python-poetry.org | python3 -
|
||||||
|
|
||||||
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.9 1
|
RUN ln -s /usr/bin/python3 /usr/bin/python
|
||||||
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 60 --slave /usr/bin/g++ g++ /usr/bin/g++-10
|
|
||||||
|
|
||||||
RUN pip3 install --upgrade pip setuptools wheel
|
|
||||||
RUN pip3 wheel cryptography
|
RUN pip3 wheel cryptography
|
||||||
RUN pip3 install grpcio-tools
|
|
||||||
|
|
||||||
RUN /root/.local/bin/poetry install
|
RUN /root/.local/bin/poetry install
|
||||||
|
|
||||||
|
RUN python3 -m venv clnenv
|
||||||
|
RUN source clnenv/bin/activate
|
||||||
|
RUN pip3 install grpcio-tools
|
||||||
|
RUN pip3 install mako
|
||||||
|
|
||||||
RUN ./configure --prefix=/tmp/lightning_install --enable-static && \
|
RUN ./configure --prefix=/tmp/lightning_install --enable-static && \
|
||||||
make DEVELOPER=${DEVELOPER} && \
|
make DEVELOPER=${DEVELOPER} && \
|
||||||
/root/.local/bin/poetry run make install
|
/root/.local/bin/poetry run make install
|
||||||
|
|
||||||
# RUN pip3 install -r plugins/clnrest/requirements.txt
|
RUN pip3 install -r plugins/clnrest/requirements.txt
|
||||||
RUN pip3 install flask gunicorn json5 flask_restx flask-socketio gevent gevent-websocket
|
|
||||||
RUN pip3 install ./contrib/pyln-client
|
RUN pip3 install ./contrib/pyln-client
|
||||||
|
|
||||||
FROM debian:bullseye-slim as final
|
FROM debian:bookworm-slim as final
|
||||||
|
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get install -y --no-install-recommends \
|
apt-get install -y --no-install-recommends \
|
||||||
|
|||||||
@@ -129,8 +129,7 @@ RUN ./configure --prefix=/tmp/lightning_install --enable-static && \
|
|||||||
make DEVELOPER=${DEVELOPER} && \
|
make DEVELOPER=${DEVELOPER} && \
|
||||||
/root/.local/bin/poetry run make install
|
/root/.local/bin/poetry run make install
|
||||||
|
|
||||||
# RUN pip3 install -r plugins/clnrest/requirements.txt
|
RUN pip3 install -r plugins/clnrest/requirements.txt
|
||||||
RUN pip3 install flask gunicorn json5 flask_restx flask-socketio gevent gevent-websocket
|
|
||||||
RUN pip3 install ./contrib/pyln-client
|
RUN pip3 install ./contrib/pyln-client
|
||||||
|
|
||||||
FROM debian:bullseye-slim as final
|
FROM debian:bullseye-slim as final
|
||||||
|
|||||||
@@ -32,5 +32,3 @@ RUN wget https://bitcoin.org/bin/bitcoin-core-$BITCOIN_VERSION/bitcoin-$BITCOIN_
|
|||||||
|
|
||||||
RUN python3 -m pip install --upgrade pip && \
|
RUN python3 -m pip install --upgrade pip && \
|
||||||
python3 -m pip install python-bitcoinlib pytest setuptools pytest-test-groups flake8 pytest-rerunfailures ephemeral-port-reserve
|
python3 -m pip install python-bitcoinlib pytest setuptools pytest-test-groups flake8 pytest-rerunfailures ephemeral-port-reserve
|
||||||
|
|
||||||
RUN python3 -m pip install flask gunicorn json5 flask_restx flask-socketio gevent gevent-websocket
|
|
||||||
|
|||||||
@@ -42,9 +42,6 @@ RUN wget https://bootstrap.pypa.io/get-pip.py -O /tmp/get-pip.py && python3 /tmp
|
|||||||
&& rm /tmp/get-pip.py \
|
&& rm /tmp/get-pip.py \
|
||||||
&& pip install poetry
|
&& pip install poetry
|
||||||
|
|
||||||
RUN pip3 install flask gunicorn json5
|
|
||||||
RUN pip3 install --user flask_restx pyln-client
|
|
||||||
|
|
||||||
RUN wget https://sh.rustup.rs -O rustup-install.sh && \
|
RUN wget https://sh.rustup.rs -O rustup-install.sh && \
|
||||||
bash rustup-install.sh --default-toolchain none --quiet -y && \
|
bash rustup-install.sh --default-toolchain none --quiet -y && \
|
||||||
rm rustup-install.sh && \
|
rm rustup-install.sh && \
|
||||||
|
|||||||
@@ -43,9 +43,6 @@ RUN wget https://bootstrap.pypa.io/get-pip.py -O /tmp/get-pip.py && python3 /tmp
|
|||||||
&& rm /tmp/get-pip.py \
|
&& rm /tmp/get-pip.py \
|
||||||
&& pip install poetry
|
&& pip install poetry
|
||||||
|
|
||||||
RUN pip3 install flask gunicorn json5
|
|
||||||
RUN pip3 install --user flask_restx pyln-client
|
|
||||||
|
|
||||||
RUN wget https://sh.rustup.rs -O rustup-install.sh && \
|
RUN wget https://sh.rustup.rs -O rustup-install.sh && \
|
||||||
bash rustup-install.sh --default-toolchain none --quiet -y && \
|
bash rustup-install.sh --default-toolchain none --quiet -y && \
|
||||||
rm rustup-install.sh && \
|
rm rustup-install.sh && \
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ if [ "$1" = "--inside-docker" ]; then
|
|||||||
PLTFM="$3"
|
PLTFM="$3"
|
||||||
git clone /src /build
|
git clone /src /build
|
||||||
cd /build
|
cd /build
|
||||||
|
pip3 install -r plugins/clnrest/requirements.txt
|
||||||
pip3 install ./contrib/pyln-client
|
pip3 install ./contrib/pyln-client
|
||||||
./configure
|
./configure
|
||||||
make VERSION="$VER"
|
make VERSION="$VER"
|
||||||
|
|||||||
Reference in New Issue
Block a user