title: Error: docker buildx on x86_64 for building multiarch--x86_64, arm64
body: <p>I just make multarch images by using <code>buildx</code><br>
  When running <code>docker buildx build --platform linux/amd64,linux/arm64 -t maskertim/zookeeper-demo .</code>
  <br></p>
  <h2>Error Message</h2>
  <p>The Error as following:</p>
  <pre><code>------
   &gt; [linux/arm64 3/5] RUN curl &quot;https://archive.apache.org/dist/kafka/2.8.0/kafka_2.13-2.8.0.tgz&quot;    -o /tmp/kafka/kafka.tgz &amp;&amp;  mkdir /kafka &amp;&amp; cd /kafka &amp;&amp;    tar -xzvf /tmp/kafka/kafka.tgz --strip 1:
  #8 0.915   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
  #8 0.916                                  Dload  Upload   Total   Spent    Left  Speed
  100 68.0M  100 68.0M    0     0   936k      0  0:01:14  0:01:14 --:--:-- 3475k
  #8 75.45 tar: Child returned status 1
  #8 75.45 tar: Error is not recoverable: exiting now
  ------
  dockerfile:9
  --------------------
     8 |     
     9 | &gt;&gt;&gt; RUN curl &quot;https://archive.apache.org/dist/kafka/${KAFKA_VERSION}/kafka_${SCALA_VERSION}-${KAFKA_VERSION}.tgz&quot; \
    10 | &gt;&gt;&gt;  -o /tmp/kafka/kafka.tgz &amp;&amp; \
    11 | &gt;&gt;&gt;  mkdir /kafka &amp;&amp; cd /kafka &amp;&amp; \
    12 | &gt;&gt;&gt;  tar -xzvf /tmp/kafka/kafka.tgz --strip 1
    13 |     
  --------------------
  error: failed to solve: process &quot;/dev/.buildkit_qemu_emulator /bin/sh -c curl \&quot;https://archive.apache.org/dist/kafka/${KAFKA_VERSION}/kafka_${SCALA_VERSION}-${KAFKA_VERSION}.tgz\&quot; \t-o /tmp/kafka/kafka.tgz &amp;&amp; \tmkdir /kafka &amp;&amp; cd /kafka &amp;&amp; \ttar -xzvf /tmp/kafka/kafka.tgz --strip 1&quot; did not complete successfully: exit code: 2
  </code></pre>
  <br>
  <h2>Dockerfile</h2>
  <p>And this is my dockerfile:</p>
  <pre><code>FROM openjdk:11.0.12-jre-buster
  
  ENV KAFKA_VERSION 2.8.0
  ENV SCALA_VERSION 2.13
  RUN mkdir /tmp/kafka &amp;&amp; \
      apt-get update &amp;&amp; \
      apt-get install -y curl
  
  RUN curl &quot;https://archive.apache.org/dist/kafka/${KAFKA_VERSION}/kafka_${SCALA_VERSION}-${KAFKA_VERSION}.tgz&quot; \
      -o /tmp/kafka/kafka.tgz &amp;&amp; \
      mkdir /kafka &amp;&amp; cd /kafka &amp;&amp; \
      tar -xzvf /tmp/kafka/kafka.tgz --strip 1
  
  COPY start-zookeeper.sh /usr/bin
  RUN chmod +x /usr/bin/start-zookeeper.sh
  
  CMD [&quot;start-zookeeper.sh&quot;]
  </code></pre>
  <p>What happens? I have no idea why to occur this error and no way to solve it.</p>