title: Docker build failing when ARG instruction is given before FROM in dockerfile?
body: <p>docker build --build-arg DOCKER_REGISTRY=in-docker-reg.citrite.net --build-arg CTX_REST_PROXY_VERSION="3.1.0" -f build/docker/dev/rest_proxy_dockerfile -t mr-kafka-rest--service .</p>
  
  <p>Sending build context to Docker daemon 988.3 MB</p>
  
  <p>Step 1 : ARG DOCKER_REGISTRY</p>
  
  <p>Please provide a source image with <code>from</code> prior to commit</p>
  
  <p>Makefile:10: recipe for target 'docker_build' failed</p>
  
  <p>make: *** [docker_build] Error 1</p>
  
  <p>Dockerfile starts with ARG instruction:</p>
  
  <pre><code>ARG DOCKER_REGISTRY
  FROM $(DOCKER_REGISTRY):5000/mr-kafka-rest/nsoslx-1.2-18-x64-docker-cp-kafka-rest-base:latest
  </code></pre>
  
  <p>I believe we can use ARG before FROM but i seem to be missing something, please help.
  <a href="https://docs.docker.com/engine/reference/builder/#understand-how-arg-and-from-interact" rel="nofollow noreferrer">https://docs.docker.com/engine/reference/builder/#understand-how-arg-and-from-interact</a></p>