binfmt
binfmt copied to clipboard
Need to uninstall and then install back after restarting Docker Desktop
Hello,
Using this project to run a container built for linux/amd64
on a M1
macbook pro, every time I restart Docker desktop, emulation stops working correctly and I get errors (here is one but it is specific to my container's stack...)
java.lang.InternalError: a fault occurred in a recent unsafe memory access operation in compiled Java code
The container doesn’t change. The JVM inside is always the same.
So I tried different things and it happens to work by uninstalling first and then install again (everytime I restart Docker desktop):
docker run --privileged --rm tonistiigi/binfmt --uninstall \*
docker run --privileged --rm tonistiigi/binfmt --install all
docker run myImage...
Note: When it doesn’t work properly, the input is faster as if no emulation. Yet If no emulation at all (if I uninstall and run my image), it wouldn't even start.
Can’t we install and use once and for all ?
I'm found uninstall command at https://github.com/tonistiigi/binfmt/issues/135#issuecomment-1581002627 and installing command can be found at https://github.com/tonistiigi/binfmt?tab=readme-ov-file#installing-emulators