On Mon, Sep 21, 2026 at 11:14:52PM +0000, Pierrick Bouvier wrote:
> On hosts != x64_64, we detect if host can run amd64 containers (usually
> through qemu-user-binfmt). If not, we deactivate container support.
>
> We could technically stop here and force container engine to use this
> platform. Since existing base image (docker.io/library/debian:13-slim)
> is multi platforms, container engine will enable this variant by
> default.
>
> Now the problem is that if user reuses this image for their own
> Dockerfiles, they will run into unpleasant surprise that now, their
> container engine is using x86_64 variant by default, on any host.
>
> So, in next commit, we'll change base image we use to x86_64 variant,
> which has a single platform: linux/amd64. This ensures we don't generate
> any unwanted side effect when building our images.
>
> Signed-off-by: Pierrick Bouvier <[email protected]>
> ---
> tests/tcg/meson.build | 19 ++++++++++++++-----
> 1 file changed, 14 insertions(+), 5 deletions(-)
>
> diff --git a/tests/tcg/meson.build b/tests/tcg/meson.build
> index 75f0a52fd22..4cf4865461e 100644
> --- a/tests/tcg/meson.build
> +++ b/tests/tcg/meson.build
> @@ -81,6 +81,7 @@ tcg_tests_summary += {'gdb': gdb}
>
> docker_supported = false
> container_command = false
> +docker_platform = ['--platform', 'linux/amd64']
> if get_option('containers')
> if get_option('container_command') != ''
> # make sure command is working
> @@ -99,6 +100,15 @@ if get_option('containers')
> container_command]
> endif
> endif
> +
> + if docker_supported
> + docker_supported = run_command([docker_wrapper, 'run', '--',
> + docker_platform,
> + 'docker.io/amd64/debian:13-slim',
> + '/bin/true'],
> + check: false).returncode() == 0
IIUC, this is checking that podman/docker is capable of running
(potentially) foreign-arch containers ? ie that qemu-user is
setup on the host. If so, would be worth a short comment here.
> + tcg_tests_summary += {'x86_64 container support': docker_supported}
> + endif
> endif
> tcg_tests_summary += {'container command': container_command}
> if get_option('container_registry') != ''
None the less:
Reviewed-by: Daniel P. Berrangé <[email protected]>
With regards,
Daniel
--
|: https://berrange.com ~~ https://hachyderm.io/@berrange :|
|: https://libvirt.org ~~ https://entangle-photo.org :|
|: https://pixelfed.art/berrange ~~ https://fstop138.berrange.com :|