From f57dc30ef51f9362c652b99c1ebe1c02017d2a1d Mon Sep 17 00:00:00 2001 From: Itamar Perez Date: Sun, 12 Oct 2025 14:02:45 -0700 Subject: [PATCH 1/2] Update KNOTS_VERSION in Docker configurations and enhance Dockerfile dependencies - Updated KNOTS_VERSION to 29.2.knots20251010 in docker-compose.yaml and related GitHub Actions workflow. - Modified Dockerfile to include additional dependencies and streamlined the build process with CMake. --- .github/workflows/docker-publish-knots.yml | 6 +-- docker-compose.yaml | 2 +- docker/knots/Dockerfile | 56 ++++++++++------------ 3 files changed, 30 insertions(+), 34 deletions(-) diff --git a/.github/workflows/docker-publish-knots.yml b/.github/workflows/docker-publish-knots.yml index ab9112e..cc7f92f 100644 --- a/.github/workflows/docker-publish-knots.yml +++ b/.github/workflows/docker-publish-knots.yml @@ -53,7 +53,7 @@ jobs: platforms: ${{ matrix.platform }} outputs: type=image,push-by-digest=true,name=ghcr.io/${{ github.repository_owner }}/knots,push=${{ github.event_name == 'push' }} build-args: | - KNOTS_VERSION=28.1.knots20250305 + KNOTS_VERSION=29.1.knots20250903 cache-from: type=gha cache-to: type=gha,mode=max @@ -102,7 +102,7 @@ jobs: working-directory: ${{ runner.temp }}/digests run: | # Create and push the manifest for multi-arch support - docker buildx imagetools create -t ghcr.io/${{ github.repository_owner }}/knots:28.1.knots20250305 \ + docker buildx imagetools create -t ghcr.io/${{ github.repository_owner }}/knots:29.1.knots20250903 \ $(printf 'ghcr.io/${{ github.repository_owner }}/knots@sha256:%s ' *) # Also create latest tag @@ -135,5 +135,5 @@ jobs: env: COSIGN_EXPERIMENTAL: "true" # Enable keyless signing run: | - cosign sign --yes ghcr.io/${{ github.repository_owner }}/knots:28.1.knots20250305 + cosign sign --yes ghcr.io/${{ github.repository_owner }}/knots:29.2.knots20251010 cosign sign --yes ghcr.io/${{ github.repository_owner }}/knots:latest \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml index 4e33893..05cd671 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -6,7 +6,7 @@ services: build: context: docker/knots args: - - KNOTS_VERSION=28.1.knots20250305 + - KNOTS_VERSION=29.2.knots20251010 environment: - RPC_USER=${RPC_USER} - RPC_PASSWORD=${RPC_PASSWORD} diff --git a/docker/knots/Dockerfile b/docker/knots/Dockerfile index b3f1458..f404e4d 100644 --- a/docker/knots/Dockerfile +++ b/docker/knots/Dockerfile @@ -40,43 +40,39 @@ RUN apk add --no-cache \ libtool \ linux-headers \ pkgconf \ - cmake + cmake \ + boost-dev \ + libevent-dev \ + sqlite-dev \ + miniupnpc-dev \ + zeromq-dev RUN tar zxf bitcoin-${KNOTS_VERSION}.tar.gz -RUN ./bitcoin-${KNOTS_VERSION}/autogen.sh - RUN make -C bitcoin-${KNOTS_VERSION}/depends -j$(nproc) NO_QT=1 NO_NATPMP=1 NO_UPNP=1 NO_USDT=1 -ENV CFLAGS="-O2 --static -static -fPIC" -ENV CXXFLAGS="-O2 --static -static -fPIC" -ENV LDFLAGS="-s -static-libgcc -static-libstdc++" +ENV CFLAGS="-O2 -fPIC" +ENV CXXFLAGS="-O2 -fPIC" +ENV LDFLAGS="-s" -RUN CONFIG_SITE=$(find /tmp/bitcoin-${KNOTS_VERSION}/depends | grep -E "config\.site$") \ - && mkdir build \ +RUN mkdir build \ && cd build \ - && ../bitcoin-${KNOTS_VERSION}/configure \ - CONFIG_SITE=${CONFIG_SITE} \ - --disable-bench \ - --disable-fuzz-binary \ - --disable-gui-tests \ - --disable-maintainer-mode \ - --disable-man \ - --disable-tests \ - --enable-lto \ - --with-daemon=yes \ - --with-gui=no \ - --with-libmultiprocess=no \ - --with-libs=no \ - --with-miniupnpc=no \ - --with-mpgen=no \ - --with-natpmp=no \ - --with-qrencode=no \ - --with-utils=yes - -RUN make -C ./build -j$(nproc) - -RUN make -C ./build install + && cmake ../bitcoin-${KNOTS_VERSION} \ + -DCMAKE_TOOLCHAIN_FILE=/tmp/bitcoin-${KNOTS_VERSION}/depends/aarch64-unknown-linux-musl/toolchain.cmake \ + -DBUILD_BITCOIN_WALLET=OFF \ + -DBUILD_BITCOIN_UTILS=ON \ + -DBUILD_BITCOIND=ON \ + -DBUILD_BITCOIN_CLI=ON \ + -DBUILD_BITCOIN_TX=ON \ + -DENABLE_BENCH=OFF \ + -DENABLE_FUZZ_BINARY=OFF \ + -DENABLE_GUI_TESTS=OFF \ + -DENABLE_MAN=OFF \ + -DENABLE_TESTS=OFF + +RUN cd build && make -j$(nproc) + +RUN cd build && make install FROM alpine:3.20 AS final From b69a5ffc25da1a497ae1225716d3b7d0216ad564 Mon Sep 17 00:00:00 2001 From: Itamar Perez Date: Sun, 12 Oct 2025 14:27:59 -0700 Subject: [PATCH 2/2] Update KNOTS_VERSION to 29.2.knots20251010 and enhance Dockerfile build process - Updated KNOTS_VERSION in GitHub Actions workflow and Dockerfile to reflect the new version. - Improved Dockerfile by dynamically setting the KNOTS_DIR and TOOLCHAIN_FILE for a more flexible build process. --- .github/workflows/docker-publish-knots.yml | 4 ++-- docker/knots/Dockerfile | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docker-publish-knots.yml b/.github/workflows/docker-publish-knots.yml index cc7f92f..8c8ab46 100644 --- a/.github/workflows/docker-publish-knots.yml +++ b/.github/workflows/docker-publish-knots.yml @@ -53,7 +53,7 @@ jobs: platforms: ${{ matrix.platform }} outputs: type=image,push-by-digest=true,name=ghcr.io/${{ github.repository_owner }}/knots,push=${{ github.event_name == 'push' }} build-args: | - KNOTS_VERSION=29.1.knots20250903 + KNOTS_VERSION=29.2.knots20251010 cache-from: type=gha cache-to: type=gha,mode=max @@ -102,7 +102,7 @@ jobs: working-directory: ${{ runner.temp }}/digests run: | # Create and push the manifest for multi-arch support - docker buildx imagetools create -t ghcr.io/${{ github.repository_owner }}/knots:29.1.knots20250903 \ + docker buildx imagetools create -t ghcr.io/${{ github.repository_owner }}/knots:29.2.knots20251010 \ $(printf 'ghcr.io/${{ github.repository_owner }}/knots@sha256:%s ' *) # Also create latest tag diff --git a/docker/knots/Dockerfile b/docker/knots/Dockerfile index f404e4d..1a5c96a 100644 --- a/docker/knots/Dockerfile +++ b/docker/knots/Dockerfile @@ -55,10 +55,12 @@ ENV CFLAGS="-O2 -fPIC" ENV CXXFLAGS="-O2 -fPIC" ENV LDFLAGS="-s" -RUN mkdir build \ +RUN export KNOTS_DIR="bitcoin-${KNOTS_VERSION}" \ + && export TOOLCHAIN_FILE=$(find /tmp/${KNOTS_DIR}/depends -name toolchain.cmake) \ + && mkdir build \ && cd build \ - && cmake ../bitcoin-${KNOTS_VERSION} \ - -DCMAKE_TOOLCHAIN_FILE=/tmp/bitcoin-${KNOTS_VERSION}/depends/aarch64-unknown-linux-musl/toolchain.cmake \ + && cmake ../${KNOTS_DIR} \ + -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_FILE} \ -DBUILD_BITCOIN_WALLET=OFF \ -DBUILD_BITCOIN_UTILS=ON \ -DBUILD_BITCOIND=ON \