Draft: Add i386 cross-compilation support in Debian Buster
My first attempt was to just add 32-bit BIND dependencies to the Debian template with a constraint in the Dockerfile
operated from docker/Makefile
, e.g. i386libs_debian_buster_amd64
. But this failed as some (but not all) Buster development libraries can't be installed at the same time in the i386
and amd64
variant as one excludes the other. In this scenario one can have either 64-bit or 32-bit BIND dependencies in the image.
The second attempt was to fork docker/bind9/debian-template/Dockerfile
, just for the Buster image with 32-bit libraries, but that seems too redundant (one can see it the mnowak/support-cross-compilation-on-buster-custom-Dockerfile
branch).
The third attempt circles around changing ARCH
variable to something else than amd64
or i386
, striping ARCH
from the SOURCE_IMAGE
variable (and thus defaulting to amd64
image when the pulling base debian:buster
image) and conditionally installing 32-bit BIND dependencies.
debian:buster:ia32:docker
CI image is based on amd64 Debian Buster, but
has additional 32-bit libraries necessary to cross-compile BIND in
32-bit.
As the image name consists of VENDOR-VERSION-ARCH
triplet, ARCH
needs to
be set to something else than amd64
(we already have
debian-buster-amd64
), or i386
as that is misleading, because this image
is not based on i386
Docker image. ia32
ARCH
is chosen for this type of
image.
As ia32
is not a standard Docker architecture, it needs to be stripped
from SOURCE_IMAGE
variable.
Special variables were added to install 32-bit libraries of DNSTAP
dependencies and the libedit
library.