Rosetta is now supported in Podman v5.1.0. There will be no further updates to this repository.
This is a temporary solution until the feature is implemented in Podman v5.
Warning
This solution only work Podman machine v4.
export CONTAINERS_MACHINE_PROVIDER=applehv
podman machine init
- Add settings for rosetta in
podman-machine-default.json
% vi ~/.config/containers/podman/machine/applehv/podman-machine-default.json
Add the following code in "devices": []
{
"kind": "rosetta",
"MountTag": "rosetta",
"InstallRosetta": true
}
podman machine start
podman machine os apply quay.io/tnk4on/rosetta --restart
- After the Podman machine restart is complete, you can run containers with rosetta
% podman machine ssh sudo cat /proc/sys/fs/binfmt_misc/rosetta
enabled
interpreter /mnt/rosetta/rosetta
flags: F
offset 0
magic 7f454c4602010100000000000000000002003e00
mask fffffffffffefe00fffffffffffffffffeffffff
% podman run --rm --arch amd64 ubi9 uname -m
x86_64
git clone https://github.com/tnk4on/podman-machine-rosetta.git
cd podman-machine-rosetta
podman build -t rosetta .
podman push rosetta quay.io/tnk4on/rosetta