binfmt icon indicating copy to clipboard operation
binfmt copied to clipboard

Need to uninstall and then install back after restarting Docker Desktop

Open NourNuxeo opened this issue 11 months ago • 1 comments

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 ?

NourNuxeo avatar Mar 12 '24 13:03 NourNuxeo

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

dalisoft avatar Apr 28 '24 16:04 dalisoft