- debian: 10
- arch: arm64
- curvebs: v1.2.5
ATTENTION: we have provided build image with deps
docker pull harbor.cloud.netease.com/curve/curvebs-build:v1.2.5-debian10-arm64
# apt packages
apt install curl git wget openjdk-11-jdk zip unzip build-essential python meson ninja-build pkg-config udev zlib1g-dev libssl-dev uuid-dev libcurl4-gnutls-dev libnl-3-dev libnl-genl-3-dev python-dev libunwind-dev python-setuptools python-wheel python-requests
# bazel
cd ~
wget https://github.com/bazelbuild/bazel/releases/download/0.17.2/bazel-0.17.2-dist.zip
mkdir bazel && unzip bazel-0.17.2-dist.zip -d bazel && cd bazel
env EXTRA_BAZEL_ARGS="--host_javabase=@local_jdk//:jdk" bash ./compile.sh
cp output/bazel /usr/local/bin
# libfiu
cd ~
git clone https://github.com/albertito/libfiu && cd libfiu
make && make PREFIX=/usr install
docker run --name build-curve -d -it --net=host -w /root -v /var/run/docker.sock:/var/run/docker.sock harbor.cloud.netease.com/curve/curvebs-build:v1.2.5-debian10-arm64 /bin/bash
docker exec -it build-curve bash
cd ~
git clone https://github.com/opencurve/curve --branch v1.2.5 && cd curve
# apply patch
curl https://gist.githubusercontent.com/h0hmj/4e973d9b0e191bd455ddd06e883792a3/raw/1de2ab5c58426e8e4f1ad161c92a79e797a8df14/arm64.patch | git apply
bash replace-curve-repo.sh # change some github.com url to mirror
(cd thirdparties/etcdclient && make)
make build
# need `make build` first
# install docker command
echo \
"deb [arch=$(dpkg --print-architecture) trusted=yes] http://mirrors.ustc.edu.cn/docker-ce/linux/debian \
buster stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
apt update && apt install docker-ce -y
make image tag=curvebs:v1.2.5-arm64 # change to your own tag