Open DCsunset opened 1 year ago
Podman supports building packages for other platforms through build command like:
podman build --platform linux/amd64,linux/arm64 --manifest image-name .
Running this command will result in the following error (suppose sh used in the Dockerfile):
exec container process `/bin/sh`: Exec format error
This is because building images for another platform requires qemu-user-static package as said in the doc, which can't be found in nixpkgs.
qemu-user-static
Steps to reproduce the behavior:
apk add nodejs
It should build images for multiple platforms successfully.
@zowoq @pennae
Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.
nix-shell -p nix-info --run "nix-info -m"
[user@system:~]$ nix-shell -p nix-info --run "nix-info -m" - system: `"x86_64-linux"` - host os: `Linux 6.1.19, NixOS, 23.05 (Stoat), 23.05pre463258.7067edc68c0` - multi-user?: `yes` - sandbox: `yes` - version: `nix-env (Nix) 2.13.3` - channels(root): `"nixos, nixos-unstable"` - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
Looks like https://github.com/NixOS/nixpkgs/pull/160802 would address this?
Yes it seems so. I think the podman module can provide an option to enable qemu-user-static after that PR is merged.
Describe the bug
Podman supports building packages for other platforms through build command like:
Running this command will result in the following error (suppose sh used in the Dockerfile):
This is because building images for another platform requires
qemu-user-static
package as said in the doc, which can't be found in nixpkgs.Steps To Reproduce
Steps to reproduce the behavior:
apk add nodejs
) using alpine imagepodman build --platform linux/amd64,linux/arm64 --manifest image-name .
to build itExpected behavior
It should build images for multiple platforms successfully.
Notify maintainers
@zowoq @pennae
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.