本站支持搜索的镜像仓库:Docker Hub、gcr.io、ghcr.io、quay.io、k8s.gcr.io、registry.gcr.io、elastic.co、mcr.microsoft.com
🌍 多架构交叉编译环境
, linux, amd64, x86_64 | X | ||
| arm-linux-gnueabi | arm, armv5 | X | ||
| arm-linux-gnueabihf | armhf, armv7, armv7l | X | ||
| aarch64-linux-gnu | arm64, aarch64 | X | ||
| mipsel-linux-gnu | mips, mipsel | X | ||
| powerpc64le-linux-gnu | powerpc, powerpc64, powerpc64le | X | ||
| x86_64-apple-darwin | osx, osx64, darwin, darwin64 | X | ||
| x86_64h-apple-darwin | osx64h, darwin64h, x86_64h | X | ||
| i386-apple-darwin | osx32, darwin32 | X | ||
| x86_64-w64-mingw32 | windows, win64 | X | ||
| i686-w64-mingw32 | win32 | X |
$ docker run --rm -v $(pwd):/workdir multiarch/crossbuild make helloworld cc helloworld.c -o helloworld $ file helloworld helloworld: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=9cfb3d5b46cba98c5aa99db67398afbebb270cb9, not stripped
其他:使用cc而非make
$ docker run --rm -v $(pwd):/workdir multiarch/crossbuild cc test/helloworld.c
$ docker run --rm -v $(pwd):/workdir -e CROSS_TRIPLE=arm-linux-gnueabi multiarch/crossbuild make helloworld cc helloworld.c -o helloworld $ file helloworld helloworld: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=c8667acaa***e05ddb9f67a5e48a337c80bc9, not stripped
$ docker run --rm -v $(pwd):/workdir -e CROSS_TRIPLE=arm-linux-gnueabihf multiarch/crossbuild make helloworld cc helloworld.c -o helloworld $ file helloworld helloworld: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=ad507da0b9aeb78e7b824692d4bae6b2e6084598, not stripped
$ docker run --rm -v $(pwd):/workdir -e CROSS_TRIPLE=powerpc64le-linux-gnu multiarch/crossbuild make helloworld cc helloworld.c -o helloworld $ file helloworld helloworld: ELF 64-bit LSB executable, 64-bit PowerPC or cisco 7500, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=035c50a8b410361d3069f77e2ec2454c70a140e8, not stripped
$ docker run --rm -v $(pwd):/workdir -e CROSS_TRIPLE=aarch64-linux-gnu multiarch/crossbuild make helloworld cc helloworld.c -o helloworld $ file helloworld helloworld: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 3.7.0, BuildID[sha1]=dce6100f0bc***bc***f3cc04bd550d60, not stripped
$ docker run --rm -v $(pwd):/workdir -e CROSS_TRIPLE=mipsel-linux-gnu multiarch/crossbuild make helloworld cc helloworld.c -o helloworld $ file helloworld helloworld: ELF 32-bit LSB executable, MIPS, MIPS-II version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=d6b2f608a3c1a56b8b990be66eed0c41baaf97cd, not stripped
$ docker run -it --rm -v $(pwd):/workdir -e CROSS_TRIPLE=i386-apple-darwin multiarch/crossbuild make helloworld o32-clang helloworld.c -o helloworld $ file helloworld helloworld: Mach-O executable i386
$ docker run -it --rm -v $(pwd):/workdir -e CROSS_TRIPLE=x86_64-apple-darwin multiarch/crossbuild make helloworld o64-clang helloworld.c -o helloworld $ file helloworld helloworld: Mach-O 64-bit executable x86_64
$ docker run -it --rm -v $(pwd):/workdir -e CROSS_TRIPLE=i686-w64-mingw32 multiarch/crossbuild make helloworld o32-clang helloworld.c -o helloworld $ file helloworld helloworld: PE32 executable (console) Intel 80386, for MS Windows
$ docker run -it --rm -v $(pwd):/workdir -e CROSS_TRIPLE=x86_64-w64-mingw32 multiarch/crossbuild make helloworld o64-clang helloworld.c -o helloworld $ file helloworld helloworld: PE32+ executable (console) x86-64, for MS Windows
FROM multiarch/crossbuild RUN git clone [***] ENV CROSS_TRIPLE=x86_64-apple-darwin WORKDIR /workdir/objective-c-hello-world RUN crossbuild ./compile-all.sh
本项目受Steeve Morin的cross-compiler启发。
OSX/Darwin/Apple构建:
请在继续之前确保您已阅读并理解Xcode许可条款。
MIT
免费版仅支持 Docker Hub 加速,不承诺可用性和速度;专业版支持更多镜像源,保证可用性和稳定速度,提供优先客服响应。
免费版仅支持 docker.io;专业版支持 docker.io、gcr.io、ghcr.io、registry.k8s.io、nvcr.io、quay.io、mcr.microsoft.com、docker.elastic.co 等。
当返回 402 Payment Required 错误时,表示流量已耗尽,需要充值流量包以恢复服务。
通常由 Docker 版本过低导致,需要升级到 20.x 或更高版本以支持 V2 协议。
先检查 Docker 版本,版本过低则升级;版本正常则验证镜像信息是否正确。
使用 docker tag 命令为镜像打上新标签,去掉域名前缀,使镜像名称更简洁。
探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录方式配置轩辕镜像加速服务,包含7个详细步骤
在 Linux 系统上配置轩辕镜像源,支持主流发行版
在 Docker Desktop 中配置轩辕镜像加速,适用于桌面系统
在 Docker Compose 中使用轩辕镜像加速,支持容器编排
在 k8s 中配置 containerd 使用轩辕镜像加速
在宝塔面板中配置轩辕镜像加速,提升服务器管理效率
在 Synology 群晖NAS系统中配置轩辕镜像加速
在飞牛fnOS系统中配置轩辕镜像加速
在极空间NAS中配置轩辕镜像加速
在爱快ikuai系统中配置轩辕镜像加速
在绿联NAS系统中配置轩辕镜像加速
在威联通NAS系统中配置轩辕镜像加速
在 Podman 中配置轩辕镜像加速,支持多系统
配置轩辕镜像加速9大主流镜像仓库,包含详细配置步骤
无需登录即可使用轩辕镜像加速服务,更加便捷高效
需要其他帮助?请查看我们的 常见问题 或 官方QQ群: 13763429