title: Docker for Windows and docker-maven-plugin - "SSLException: Unrecognized SSL message, plaintext connection" error
body: <p>I'm using <strong>Docker Desktop for Windows</strong> v1.13.0 and <strong>docker-maven-plugin</strong> v0.4.13 on my local Windows 10 Pro machine. I'm using <code>mvn clean package docker:build</code> to build my project and generate the docker image. The build fails: </p>
  
  <blockquote>
    <p>[INFO]
    ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO]
    ------------------------------------------------------------------------ [INFO] Total time: 25.006 s [INFO] Finished at:
    2017-01-19T14:48:45-02:00 [INFO] Final Memory: 68M/619M [INFO]
    ------------------------------------------------------------------------ [ERROR] Failed to execute goal
    com.spotify:docker-maven-plugin:0.4.13:build (default-cli) on project
    monitoramentoRS: Exception caught:
    java.util.concurrent.ExecutionException:
    com.spotify.docker.client.shaded.javax.ws.rs.ProcessingException:
    javax.net.ssl.SSLException: Unrecognized SSL message, plaintext
    connection? -> [Help 1]</p>
  </blockquote>
  
  <p>Creating the docker image on the command line directly (<code>docker build -t ...</code>) works fine. The maven plugin was working fine with Docker toolbox and Oracle Virtual Box on Windows 7. </p>
  
  <p>Therefore, I believe there's a TLS-related configuration issue between docker-maven-plugin and the Docker for Windows daemon. I've tried different configuration combinations using <code>DOCKER_HOST</code> (no port indication, 2375, 2376), <code>DOCKER_TLS_VERIFY</code>, and <code>DOCKER_TLS</code> to no avail. Also tried the <code>"tls"</code> and <code>"tlsverify"</code> attributes of the "advanced" Docker for Windows daemon configuration. </p>
  
  <p>Has anyone been able to make docker-maven-plugin create a docker image on Docker for Windows? </p>
  
  <p>My <code>%HOME%\.docker\config.json</code> file only contains an <code>auths</code> collection:</p>
  
  <pre><code>{
      "auths": {
          "our-corporate-private-docker-registry-address": {
              "auth": "an-authorization-token"
          },
          "https://index.docker.io/v1/": {
              "auth": "an-authorization-token"
          }
      }
  }
  </code></pre>
  
  <p>Below is the docker-maven-plugin config. </p>
  
  <pre><code>&lt;plugin&gt;
      &lt;groupId&gt;com.spotify&lt;/groupId&gt;
      &lt;artifactId&gt;docker-maven-plugin&lt;/artifactId&gt;
      &lt;version&gt;0.4.13&lt;/version&gt;
      &lt;configuration&gt;
          &lt;useConfigFile&gt;false&lt;/useConfigFile&gt; &lt;!-- true yields the same error --&gt;
          &lt;registryUrl&gt;${docker.private.registry}&lt;/registryUrl&gt;
          &lt;imageName&gt;${docker.private.registry}/myrepo/myimage&lt;/imageName&gt;
          &lt;imageTags&gt;
              &lt;imageTag&gt;latest&lt;/imageTag&gt;
          &lt;/imageTags&gt;
          &lt;dockerDirectory&gt;${basedir}/docker&lt;/dockerDirectory&gt;  &lt;!-- Dockerfile location --&gt;
          &lt;resources&gt;
              &lt;resource&gt;
                  &lt;targetPath&gt;/&lt;/targetPath&gt;
                  &lt;directory&gt;${project.build.directory}&lt;/directory&gt;                                           &lt;include&gt;${project.build.finalName}.${project.packaging}&lt;/include&gt;
              &lt;/resource&gt;
          &lt;/resources&gt;
      &lt;/configuration&gt;
  &lt;/plugin&gt;
  </code></pre>