Skip to content

Commit

Permalink
Add Dockerfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
willcl-ark committed Nov 28, 2024
1 parent 2b33322 commit e6ff612
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 0 deletions.
41 changes: 41 additions & 0 deletions ci/test/Dockerfile.asan
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
FROM bitcoin-core-base:latest

# Add any additional environment variables
RUN export BPFCC_PACKAGE="bpfcc-tools linux-headers-$(uname --kernel-release)"
ENV LLVM_VERSION="19"
ENV BITCOIN_CONFIG="\
-DWITH_USDT=ON -DWITH_ZMQ=ON -DWITH_BDB=ON -DWARN_INCOMPATIBLE_BDB=OFF -DBUILD_GUI=ON \
-DSANITIZERS=address,float-divide-by-zero,integer,undefined \
-DCMAKE_C_COMPILER=clang-${LLVM_VERSION} \
-DCMAKE_CXX_COMPILER=clang++-${LLVM_VERSION} \
-DCMAKE_C_FLAGS='-ftrivial-auto-var-init=pattern' \
-DCMAKE_CXX_FLAGS='-ftrivial-auto-var-init=pattern -Wno-error=deprecated-declarations' \
-DAPPEND_CXXFLAGS='-std=c++23' \
-DAPPEND_CPPFLAGS='-DARENA_DEBUG -DDEBUG_LOCKORDER' \
"

# For LLVM 19 sources
RUN wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc \
&& . /etc/os-release \
&& echo "deb http://apt.llvm.org/${VERSION_CODENAME}/ llvm-toolchain-${VERSION_CODENAME}-${LLVM_VERSION} main" > "/etc/apt/sources.list.d/llvm-toolchain-${VERSION_CODENAME}-${LLVM_VERSION}.list"

# Install specific packages
RUN apt-get update && apt-get install --yes \
"${BPFCC_PACKAGE}" \
clang-${APT_LLVM_VERSION} \
libboost-dev \
libclang-rt-${LLVM_VERSION}-dev \
libdb5.3++-dev \
libevent-dev \
libqrencode-dev \
libsqlite3-dev \
libzmq3-dev \
llvm-${LLVM_VERSION} \
python3-zmq \
qtbase5-dev \
qttools5-dev \
qttools5-dev-tools \
systemtap-sdt-dev \
&& rm -rf /var/lib/apt/lists/*

CMD ["bash"]
25 changes: 25 additions & 0 deletions ci/test/Dockerfile.base
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# ubuntu:noble-20241015
FROM ubuntu:noble-20241015@sha256:278628f08d4979fb9af9ead44277dbc9c92c2465922310916ad0c46ec9999295

ENV DEBIAN_FRONTEND=noninteractive

# CI Base Packages
RUN apt-get update && apt-get install --yes \
bison \
build-essential \
ca-certificates \
ccache \
cmake \
curl \
e2fsprogs \
git \
ninja-build \
pkg-config \
procps \
python3 \
python3-pip \
rsync \
wget \
&& rm -rf /var/lib/apt/lists/*

CMD ["bash"]
13 changes: 13 additions & 0 deletions ci/test/docker-bake.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
target "base" {
context = "."
dockerfile = "./Dockerfile.base"
platforms = ["linux/amd64"]
tags = ["bitcoin-core-base:latest"]
}

target "asan" {
dockerfile = "./Dockerfile.asan"
context = "."
platforms = ["linux/amd64"]
tags = ["bitcoin-core-asan:latest"]
}
9 changes: 9 additions & 0 deletions ci/test/justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[private]
default:
@just --list

base:
docker buildx bake base

asan:
docker buildx bake asan

0 comments on commit e6ff612

Please sign in to comment.