- 启动一个alpine容器:
docker run -dti --name alpine alpine sh
- 登入该容器:
docker exec -ti alpine sh
- 安装必要的包(可能需要先设置代理):
apk add wget alpine-sdk linux-headers libowfat-dev zlib-dev
- 从
https://git.alpinelinux.org/aports/tree/community/opentracker/APKBUILD
中获取opentracker源码包位置 - 下载opentracker源码包:
wget https://dev.alpinelinux.org/opentracker/opentracker-0_git20210823.tar.gz
- 解压并进入目录:
tar zxvf https://dev.alpinelinux.org/opentracker/opentracker-0_git20210823.tar.gz; cd opentracker
- 编译:
make PREFIX=/usr/include LDFLAGS+=-static LDFLAGS+=-l:libowfat.a
- 得到静态编译的opentracker二进制程序,将其拷贝出容器
Created
April 14, 2023 06:29
-
-
Save Vesnica/cdf9d021507f3d3e48842b251ea607e0 to your computer and use it in GitHub Desktop.
Static compile opentracker
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment