title: Can't connect to the docker daemon while running Maven jib plugin in Gitlab CI
body: <p>I'm trying to build a docker image with my application in Gitlab continuous integration using the jib Maven plugin, but I can't get the plugin connect to the docker daemon using the dind (docker-in-docker) service. Currently I'm using this configuration in my gitlab-ci.yml file:</p>
  
  <pre><code>deploy:mvn:
    image: maven:3.6.3-jdk-8-openj9
    stage: deploy
    services:
      - docker:dind
    script:
      - mvn compile jib:dockerBuild
  </code></pre>
  
  <p>This is the error I get:</p>
  
  <blockquote>
    <p>[ERROR] Failed to execute goal
    com.google.cloud.tools:jib-maven-plugin:0.9.11:dockerBuild
    (default-cli) on project my-application: Build to Docker daemon failed,
    perhaps you should make sure Docker is installed and you have correct
    privileges to run it -> [Help 1]</p>
  </blockquote>
  
  <hr>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I updated to 2.2.0 and it's running locally. I added the <code>docker images</code> command before and the plugin seems not to be able to find the docker command in Gitlab CI:</p>
  
  <blockquote>
    <p>$ docker images &amp;&amp; mvn compile jib:dockerBuild /bin/bash: line 97:
    docker: command not found</p>
  </blockquote>
  
  <p>This is the configuration for the jib plugin:</p>
  
  <pre><code>&lt;plugin&gt;
      &lt;groupId&gt;com.google.cloud.tools&lt;/groupId&gt;
      &lt;artifactId&gt;jib-maven-plugin&lt;/artifactId&gt;
      &lt;version&gt;2.2.0&lt;/version&gt;
      &lt;configuration&gt;
          &lt;from&gt;
              &lt;image&gt;adoptopenjdk/openjdk11:alpine-jre&lt;/image&gt;
          &lt;/from&gt;
          &lt;to&gt;
              &lt;image&gt;my-application:latest&lt;/image&gt;
          &lt;/to&gt;
          &lt;container&gt;
              &lt;entrypoint&gt;
                  &lt;shell&gt;sh&lt;/shell&gt;
                  &lt;option&gt;-c&lt;/option&gt;
                  &lt;arg&gt;chmod +x /entrypoint.sh &amp;amp;&amp;amp; sync &amp;amp;&amp;amp; /entrypoint.sh&lt;/arg&gt;
              &lt;/entrypoint&gt;
              &lt;ports&gt;
                  &lt;port&gt;8080&lt;/port&gt;
              &lt;/ports&gt;
              &lt;environment&gt;
                  &lt;SPRING_OUTPUT_ANSI_ENABLED&gt;ALWAYS&lt;/SPRING_OUTPUT_ANSI_ENABLED&gt;
                  &lt;JHIPSTER_SLEEP&gt;0&lt;/JHIPSTER_SLEEP&gt;
              &lt;/environment&gt;
              &lt;creationTime&gt;USE_CURRENT_TIMESTAMP&lt;/creationTime&gt;
          &lt;/container&gt;
      &lt;/configuration&gt;
  &lt;/plugin&gt;
  </code></pre>