title: Using --build-arg to modify FROM clause in Docker image
body: <p>Say we have a Dockerfile like so:</p>
  
  <pre><code>FROM node:9
  </code></pre>
  
  <p>and we build it with:</p>
  
  <pre><code>docker build -t foo .
  </code></pre>
  
  <p>my question is - is there a way to change the FROM clause using a <code>--build-arg</code>, something like this:</p>
  
  <pre><code>ARG NODE_VERSION
  FROM node:$NODE_VERSION
  </code></pre>
  
  <p>and the build that with:</p>
  
  <pre><code>docker build -t foo --build-arg NODE_VERSION="8" .
  </code></pre>