<p>I have an asp.net core 2.0 application whose docker image runs fine locally, but when that same image is deployed to an AKS cluster, the pods have a status of <em>CrashLoopBackOff</em> and the pod log shows:</p>

<blockquote>
  <p>Did you mean to run dotnet SDK commands? Please install dotnet SDK from:
   <a href="http://go.microsoft.com/fwlink/?LinkID=798306&amp;clcid=0x409" rel="nofollow noreferrer">http://go.microsoft.com/fwlink/?LinkID=798306&amp;clcid=0x409</a>.</p>
</blockquote>

<p>And since you can't ssh to AKS clusters, it's pretty difficult to figure this out?</p>

<p><strong>Dockerfile</strong>:</p>

<pre><code>FROM microsoft/aspnetcore:2.0
WORKDIR /app
COPY . .
EXPOSE 80
ENTRYPOINT ["dotnet", "myapi.dll"]
</code></pre>

<p>Turned out that our build system wasn't putting the app code into the container as we thought. Since the container wasn't runnable, I didn't know how to inspect its contents until I found this command which is a lifesaver for these kinds of situations:</p>

<p><code>docker run --rm -it --entrypoint=/bin/bash [image_id]</code></p>

<p>... which at this point, you can freely inspect/verify the contents of the container.</p>
