title: .NET Core Docker Image for Linux-arm (Raspberry pi)
body: <p>I made a simple <strong>.Net 6.0 console app</strong> and i built it using dotnet publish command with the flag of linux-arm</p>
  <blockquote>
  <p>dotnet pubish -c release -r linux-arm</p>
  </blockquote>
  <p>Above generates the linux ARM dll's.</p>
  <p>Then I created an image for it using <em>Dockerfile</em></p>
  <pre><code>FROM mcr.microsoft.com/dotnet/runtime:6.0
   COPY bin/Release/net6.0/linux-arm /MyDockerApp
   WORKDIR /MyDockerApp
     ENTRYPOINT [&quot;dotnet&quot;, &quot;DockerTest.dll&quot;]
  </code></pre>
  <p>(I am not building it, since my code is already built for arm-v7 using dotnet publish)</p>
  <p>Now I am trying to run this image as a container on my Raspberry pi (which is Arm/Linux/v7) and i am getting below error.</p>
  <blockquote>
  <p>WARNING: The requested image's platform (linux/amd64) does not match
  the detected host platform (linux/arm/v7) and no specific platform was
  requested standard_init_linux.go:228: exec user process caused: exec
  format error</p>
  </blockquote>
  <p>How can I compile it so I can run it on my Raspberrypi 4 (I dont want to build my code on Raspberry pi, I just want to use the RunTime).</p>