源码编译
1. 容器编译
可以执行如下命令,完成编译,静态代码检查。
$ sh build/build-run-testing-image.sh
或者单独执行:
1. 准备编译环境
$ docker build --network host -t huatuo/huatuo-bamai-dev:latest -f ./Dockerfile.devel .
2. 启动编译容器
$ docker run -it --privileged --cgroupns=host --network=host -v $(pwd):/go/huatuo-bamai huatuo/huatuo-bamai-dev:latest sh
3. 进入容器编译
$ make
2. 物理机编译
2.1 安装依赖
Ubuntu 24.04:
apt install make git clang libbpf-dev linux-tools-common curl
Fedora 40:
dnf install make git clang libbpf-devel bpftool curl
2.2 编译
$ make
3. 镜像发布
通过 docker build 方式能够快速的发布,最新二进制容器镜像。
docker build --network host -t huatuo/huatuo-bamai:latest .
页面反馈
此页面对您有帮助吗?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.