Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/docker-publish-knots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.2.knots20251010
cache-from: type=gha
cache-to: type=gha,mode=max

Expand Down Expand Up @@ -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.2.knots20251010 \
$(printf 'ghcr.io/${{ github.repository_owner }}/knots@sha256:%s ' *)

# Also create latest tag
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
56 changes: 27 additions & 29 deletions docker/knots/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,43 +40,41 @@ 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$") \
RUN export KNOTS_DIR="bitcoin-${KNOTS_VERSION}" \
&& export TOOLCHAIN_FILE=$(find /tmp/${KNOTS_DIR}/depends -name toolchain.cmake) \
&& 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 ../${KNOTS_DIR} \
-DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_FILE} \
-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
Expand Down