title: Error response from daemon: Dockerfile parse error Unknown flag: mount
body: <p>There is a previous question (<a href="https://stackoverflow.com/questions/48167955/docker-unknown-flag-mount">Docker Unknown flag --mount</a>) facing the same error that was due to having an out-of-date version of Docker running. I have an up-to-date version of Docker running.</p>
  
  <p>I have the following <code>Dockerfile</code>:</p>
  
  <pre><code>FROM continuumio/miniconda3
  
  RUN --mount=type=ssh pip install git+ssh://git@github.com/myrepo/myproject.git@develop
  RUN conda install numpy
  ...
  </code></pre>
  
  <p>According to the <a href="https://docs.docker.com/develop/develop-images/build_enhancements/#using-ssh-to-access-private-data-in-builds" rel="noreferrer">documentation</a>, I should be able to simply run <code>docker build --ssh default .</code>. However, I receive the following error:</p>
  
  <pre><code>Sending build context to Docker daemon  2.048kB
  Error response from daemon: Dockerfile parse error line 3: Unknown flag: mount
  </code></pre>
  
  <p>Output of <code>docker version</code>:</p>
  
  <pre><code>Client: Docker Engine - Community
   Version:           18.09.2
   API version:       1.39
   Go version:        go1.10.8
   Git commit:        6247962
   Built:             Sun Feb 10 04:12:39 2019
   OS/Arch:           darwin/amd64
   Experimental:      false
  
  Server: Docker Engine - Community
   Engine:
    Version:          18.09.2
    API version:      1.39 (minimum version 1.12)
    Go version:       go1.10.6
    Git commit:       6247962
    Built:            Sun Feb 10 04:13:06 2019
    OS/Arch:          linux/amd64
    Experimental:     true
  </code></pre>
  
  <p>I would like to build a Docker image without exposing my private SSH credentials, and this seemed to be the supported method. Anyone have thoughts on what's causing the issue?</p>