title: How to implement a conditional package install for Windows and Linux containers in the same Dockerfile
body: <p>I want to use the same Dockerfile for Windows and Linux containers. It uses build arguments top define the base image like:</p>
  <pre><code>FROM $SDK_REPO:$SDK_VERSION AS build-env
  </code></pre>
  <p>It also defines a argument called $PLATFORM which is either <em>linux</em> or <em>windows</em>.</p>
  <p>Now I want to install a package only when the image is build for linux.
  I tried to use an if switch like:</p>
  <pre><code>RUN if [ $PLATFORM = linux ]; then apt-get update &amp;&amp; apt-get install -y &lt;mypackage&gt;; fi
  </code></pre>
  <p>Obviously, this doesn't work on windows because its using bash syntax.</p>
  <p>Is it somehow possible to use the same dockerfile both for windows and linux containers and to do an apt-get install only when my platform argument is linux?</p>