title: Docker buildx mulitarch armv6
body: <h3>What I need:</h3>
  <p>A test container on a x86_64 machine for a raspberry pi zero, which works with qemu emulation for <strong>armv6l</strong>.</p>
  <h3>What I've got so far:</h3>
  <p>A Dockerfile with a test code</p>
  <pre><code>FROM python:3.7.9
  
  COPY hello.py ./
  
  CMD [ &quot;python3&quot;, &quot;./hello.py&quot; ]
  </code></pre>
  <p>The image is built with this command:</p>
  <p><code>docker buildx build --platform linux/arm/v6 -t test/hello --push .</code></p>
  <p>After it has been uploaded and built for linux/arm/v6 I try to run it with this command:</p>
  <pre><code>docker run --platform=linux/arm/v6 --rm -t test/hello uname -mpi 
  Output: armv7l unknown unknown
  </code></pre>
  <p>I have set up qemu and binfmt like they say on their github page:
  <a href="https://github.com/docker/buildx#building-multi-platform-images" rel="nofollow noreferrer">https://github.com/docker/buildx#building-multi-platform-images</a></p>
  <p>I do not understand why the output is armv7l, because I did everything to make an armv6l image. I do not know if I need to make adjustments to docker or qemu itself.
  I am quite new to the buildx system of docker and how to emulate the container under qemu so if anyone could help me out with this problem I would be very grateful.</p>
  <h3>EDIT:</h3>
  <p>Thanks to <a href="https://stackoverflow.com/users/4499941/peter-maydell">Peter</a> the container is know forced to use armv6l.</p>
  <pre><code>docker run -e QEMU_CPU=arm1176 --platform=linux/arm/v6 --rm -t test/hello uname -mpi
  Output: armv6l unknown unknown
  </code></pre>