Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
I am new to Docker and Qemu. I am thinking about using
this Qemu
I am trying to understand the following command:
docker run --rm --privileged multiarch/qemu-user-static:register --reset
Why did they include --reset
, and what significance does the register
tag have?
Thank you in advance!
I guess --reset
it means what they wrote in the ReadMe: Remove all registered binfmt_misc before, so by looking into register.sh
you can see the following:
if [ "${1}" = "--reset" ]; then
shift
find /proc/sys/fs/binfmt_misc -type f -name 'qemu-*' -exec sh -c 'echo -1 > {}' \;
So when you pass --reset
it will disable everything related to qemu and the register
tag itself i guess they use to enable binfmt_misc
before using Qemu because if it was not found the container will fail:
if [ ! -d /proc/sys/fs/binfmt_misc ]; then
echo "No binfmt support in the kernel."
echo " Try: '/sbin/modprobe binfmt_misc' from the host"
exit 1
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.