title: Docker build says no specific platform was requested even though I do specify --platform
body: <p>I'm trying to use an x86 Linux host machine to build an arm64 Linux docker image.
  Despite specifying <code>--platform linux/arm64</code>, I still get errors that suggest I'm not.</p>
  <p>Dockerfile:</p>
  <pre><code>FROM ubuntu:20.04
  SHELL [&quot;/bin/bash&quot;, &quot;-c&quot;]
  RUN echo 'Hello world'
  </code></pre>
  <p>Command:</p>
  <pre><code>docker build --progress plain --platform linux/arm64 -f test.Dockerfile . --no-cache
  </code></pre>
  <p>Output:</p>
  <pre><code>Sending build context to Docker daemon  989.2kB
  Step 1/2 : FROM ubuntu:20.04
   ---&gt; d25e19480966
  Step 2/2 : RUN echo 'Hello world'
   ---&gt; [Warning] The requested image's platform (linux/arm64/v8) does not match the detected host platform (linux/amd64) and no specific platform was requested
   ---&gt; Running in f6c3dc9c965f
  standard_init_linux.go:228: exec user process caused: exec format error
  The command '/bin/sh -c echo 'Hello world'' returned a non-zero code: 1
  </code></pre>
  <p>Why does docker tell me &quot;and no specific platform was requested&quot; even though I do specify one? Oddly enough, this command works on my M1 Mac regardless of whether I specify linux/amd64 or linux/arm64 as the target platform. I would have expected a Linux-to-Linux build to run more smoothly. What am I missing?</p>
  <h3>Additional details:</h3>
  <p>Host machine is an EC2 instance running the Amazon Linux 2 AIM (amzn2-ami-kernel-5.10-hvm-2.0.20220606.1-x86_64-gp2)</p>
  <pre><code>$ docker --version
  Docker version 20.10.13, build a224086
  </code></pre>
  <pre><code>$ uname -m
  x86_64
  </code></pre>
  <p>I installed qemu manually via</p>
  <pre><code>sudo yum install qemu-kvm -y
  </code></pre>