{"repo":"tonistiigi/xx","free":true,"listed":false,"github":"https://github.com/tonistiigi/xx","clone":"git clone https://github.com/tonistiigi/xx.git","description":"Dockerfile cross-compilation helpers","language":"Shell","stars":570,"topics":["docker","dockerfile","alpine","debian","cross-compiler"],"license":"MIT","category":"deployment-docker-iac","readme_excerpt":"xx - Dockerfile cross-compilation helpers xx provides tools to support cross-compilation from Dockerfiles that understand the --platform flag passed in from docker build or docker buildx build . These helpers allow you to build multi-platform images from any architecture into any architecture supported by your compiler with native performance. Adding xx to your Dockerfile should only need minimal updates and should not require custom conditions for specific architectures. Dockerfile cross-compilation primer Installation Verifying release integrity Supported targets xx-info - Information about the build context Parsing current target Architecture formats Target triple Build context xx-apk , xx-apt , xx-apt-get - Installing packages for target architecture xx-verify - Verifying compilation results C/C++ Building on Alpine Building on Debian Wrapping as default Autotools CMake Go / Cgo Rust Building on Alpine Building on Debian External SDK support Used by Issues Dockerfile cross-compilation primer Cross-compilation can be achieved in Dockerfiles by using multi-stage builds and defining some of the stages to always run on the native architecture used by the builder and execute the cross-compiling compiler. By default, a Dockerfile stage started with FROM keyword default to the target architecture, but this can be overridden with a FROM --platform flag. Using automatic platform ARGs in global scope, the platform of the cross-compiler stage can be set to $BUILDPLATFORM while the v","default_branch":null,"files":null,"tree":[],"storefront":"/r/tonistiigi","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/tonistiigi/xx/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}