
如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。
只需在 AI 对话中先发送下面这句话即可:
请先完整阅读并严格遵守以下文档中的全部规则与要求:
https://xuanyuan.cloud/agents.md
在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
This is a Docker image for building Alpine Linux packages.
We tag each release with a simple v# version scheme. Here are the tags to choose from:
andyshinn/alpine-abuild:v1: based on Alpine 3.3andyshinn/alpine-abuild:v2: based on Alpine 3.4andyshinn/alpine-abuild:v3: based on Alpine 3.5andyshinn/alpine-abuild:v4: based on Alpine 3.6andyshinn/alpine-abuild:v5: based on Alpine 3.6andyshinn/alpine-abuild:v6: based on Alpine 3.7andyshinn/alpine-abuild:v7: based on Alpine 3.8andyshinn/alpine-abuild:v8: based on Alpine 3.9andyshinn/alpine-abuild:v9: based on Alpine 3.10andyshinn/alpine-abuild:v10: based on Alpine 3.11andyshinn/alpine-abuild:v11: based on Alpine 3.12andyshinn/alpine-abuild:v12: based on Alpine 3.13andyshinn/alpine-abuild:edge: based on Alpine edge (includes testing repository as well)The builder is typically run from your Alpine Linux package source directory (changing ~/.abuild/mykey.rsa and ~/.abuild/mykey.rsa.pub to your packager private and public key locations):
docker run \ -e RSA_PRIVATE_KEY="$(cat ~/.abuild/mykey.rsa)" \ -e RSA_PRIVATE_KEY_NAME="mykey.rsa" \ -v "$PWD:/home/builder/package" \ -v "$HOME/.abuild/packages:/packages" \ -v "$HOME/.abuild/mykey.rsa.pub:/etc/apk/keys/mykey.rsa.pub" \ andyshinn/alpine-abuild:v2
This would build the package at your current working directory, and place the resulting packages in ~/.abuild/packages/builder/x86_64. Subsequent builds of packages will update the ~/.abuild/packages/builder/x86_64/APKINDEX.tar.gz file.
You can also run the builder anywhere. You just need to mount your package source and build directories to /home/builder/package and /packages, respectively.
There are a number of environment variables you can change at package build time:
RSA_PRIVATE_KEY: This is the contents of your RSA private key. This is optional. You should use PACKAGER_PRIVKEY and mount your private key if not using RSA_PRIVATE_KEY.RSA_PRIVATE_KEY_NAME: Defaults to ssh.rsa. This is the name we will set the private key file as when using RSA_PRIVATE_KEY. The file will be written out to /home/builder/$RSA_PRIVATE_KEY_NAME.PACKAGER_PRIVKEY: Defaults to /home/builder/.abuild/$RSA_PRIVATE_KEY_NAME. This is generally used if you are ***d mounting your private key instead of passing it in with RSA_PRIVATE_KEY.REPODEST: Defaults to /packages. If you want to override the destination of the build packages. You must also be sure the builder user has access to write to the destination. The abuilder entry point will atte*** to mkdir -p this location.PACKAGER: Defaults to Glider Labs <team@gliderlabs.com>. This is the name of the package used in package metadata.You can use this image to generate keys if you don't already have them. Generate them in a container using the following command (replacing Glider Labs <team@gliderlabs.com> with your own name and email):
docker run --name keys --entrypoint abuild-keygen -e PACKAGER="Glider Labs <team@gliderlabs.com>" andyshinn/alpine-abuild:v2 -n
You'll see some output like the following:
Generating RSA private key, 2048 bit long modulus .............................................+++ .................................+++ e is 65537 (0x10001) writing RSA key >>> >>> You'll need to install /home/builder/.abuild/team@gliderlabs.com-5592f9b1.rsa.pub into >>> /etc/apk/keys to be able to install packages and repositories signed with >>> /home/builder/.abuild/team@gliderlabs.com-5592f9b1.rsa >>> >>> You might want add following line to /home/builder/.abuild/abuild.conf: >>> >>> PACKAGER_PRIVKEY="/home/builder/.abuild/team@gliderlabs.com-5592f9b1.rsa" >>> >>> >>> Please remember to make a safe backup of your private key: >>> /home/builder/.abuild/team@gliderlabs.com-5592f9b1.rsa >>>
This output contains the path to your public and private keys. Copy the keys out of the container:
amkdir ~/.abuild docker cp keys:/home/builder/.abuild/team@gliderlabs.com-5592f9b1.rsa ~/.abuild/ docker cp keys:/home/builder/.abuild/team@gliderlabs.com-5592f9b1.rsa.pub ~/.abuild/
Put your key files in a same place and destroy this container:
docker rm -f keys
The builder has configured APK to use /var/cache/apk as its cache directory. This directory can be mounted as a volume to prevent the repeated download of dependencies when building packages.
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务