title: Maven Docker issue Java Spring Boot Failed to execute goal io.fabric8:docker-maven-plugin
body: <p>I'm trying to create a Spring-boot container, but i'm having some trouble with it:</p>
  
  <p>This is the error i'm getting on a compute-engine vm on gcloud running Debian.</p>
  
  <p>The command i ran is </p>
  
  <pre><code>maven clean install
  </code></pre>
  
  <p>I have tried google searching these issues, but most of the answers are related to an improper installation of docker, which is not the case:</p>
  
  <p>Running the docker hello-world example worked, and i'm unsure what the problem is.</p>
  
  <pre><code>[INFO] 
  [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ dockboot ---
  [INFO] Changes detected - recompiling the module!
  [INFO] Compiling 5 source files to /home/jeffpascal96/docker_boot/target/classes
  [INFO] 
  [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ dockboot ---
  [INFO] Using 'UTF-8' encoding to copy filtered resources.
  [INFO] skip non existing resourceDirectory /home/jeffpascal96/docker_boot/src/test/resources
  [INFO] 
  [INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ dockboot ---
  [INFO] No sources to compile
  [INFO] 
  [INFO] --- maven-surefire-plugin:2.18.1:test (default-test) @ dockboot ---
  [INFO] No tests to run.
  [INFO] 
  [INFO] --- maven-jar-plugin:2.6:jar (default-jar) @ dockboot ---
  [INFO] Building jar: /home/jeffpascal96/docker_boot/target/dockboot-0.2-SNAPSHOT.jar
  [INFO] 
  [INFO] --- spring-boot-maven-plugin:1.5.13.RELEASE:repackage (default) @ dockboot ---
  [INFO] 
  [INFO] --- docker-maven-plugin:0.31.0:build (build-docker-image) @ dockboot ---
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] Total time: 13.392 s
  [INFO] Finished at: 2019-09-15T11:46:23+00:00
  [INFO] Final Memory: 32M/78M
  [INFO] ------------------------------------------------------------------------
  [ERROR] Failed to execute goal io.fabric8:docker-maven-plugin:0.31.0:build (build-docker-image) on project dockboot
  : Execution build-docker-image of goal io.fabric8:docker-maven-plugin:0.31.0:build failed: No &lt;dockerHost&gt; given, n
  o DOCKER_HOST environment variable, no read/writable '/var/run/docker.sock' or '//./pipe/docker_engine' and no exte
  rnal provider like Docker machine configured -&gt; [Help 1]
  [ERROR] 
  [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
  [ERROR] Re-run Maven using the -X switch to enable full debug logging.
  [ERROR] 
  [ERROR] For more information about the errors and possible solutions, please read the following articles:
  [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
  </code></pre>
  
  <p>pom.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
          &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
          &lt;groupId&gt;javatechy&lt;/groupId&gt;
          &lt;artifactId&gt;dockboot&lt;/artifactId&gt;
          &lt;version&gt;0.2-SNAPSHOT&lt;/version&gt;
          &lt;packaging&gt;jar&lt;/packaging&gt;
          &lt;name&gt;dockboot&lt;/name&gt;
          &lt;description&gt;Demo project for Dockerized Spring boot&lt;/description&gt;
          &lt;parent&gt;
                  &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
                  &lt;version&gt;1.5.13.RELEASE&lt;/version&gt;
                  &lt;relativePath /&gt; &lt;!-- lookup parent from repository --&gt;
          &lt;/parent&gt;
          &lt;properties&gt;
                  &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
                  &lt;project.reporting.outputEncoding&gt;UTF-8&lt;/project.reporting.outputEncoding&gt;
                  &lt;java.version&gt;1.8&lt;/java.version&gt;
                  &lt;docker.registry&gt;javatechy&lt;/docker.registry&gt;
          &lt;/properties&gt;
          &lt;scm&gt;
                  &lt;connection&gt;scm:git:https://javatechy@github.com/javatechy/docker_boot.git&lt;/connection&gt;
                  &lt;developerConnection&gt;scm:git:https://javatechy@github.com/javatechy/docker_boot.git&lt;/developerConne
  ction&gt;
                  &lt;tag&gt;HEAD&lt;/tag&gt;
          &lt;/scm&gt;
          &lt;dependencies&gt;
                  &lt;dependency&gt;
                          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                          &lt;artifactId&gt;spring-boot-starter-actuator&lt;/artifactId&gt;
                  &lt;/dependency&gt;
                  &lt;dependency&gt;
  </code></pre>
  
  <p>Dockerfile</p>
  
  <pre><code>FROM javatechy/openjdk-8-slim
  MAINTAINER Deepak Kumar &lt;deepak.kumar.iet@gmail.com&gt;
  ENV ENV_NAME local
  ENV BOOTAPP_JAVA_OPTS -Xms256m -Xmx256m
  ENV LOG_PATH "/var/log/casa"
  ENV BOOTAPP_USR="root" BOOTAPP_GROUP="root" BOOTAPP_PATH="/app.jar"
  ENV SERVER_PORT 8000
  EXPOSE $SERVER_PORT
  COPY wrapper.sh /wrapper.sh
  RUN chmod 555 /wrapper.sh
  USER root
  COPY maven/app.jar $BOOTAPP_PATH
  RUN chmod 555 $BOOTAPP_PATH &amp;&amp; \
              touch $BOOTAPP_PATH
  RUN mkdir $LOG_PATH            
  RUN chmod 777 $LOG_PATH &amp;&amp; touch $LOG_PATH 
  USER $BOOTAPP_USR
  # RUN cat ./newrelic/newrelic.yml | sed -e 's/app_name:.*/app_name: docker_boot/' &gt; ./newrelic/newrelic.yml
  
  ENTRYPOINT ["/wrapper.sh"]
  </code></pre>
  
  <pre><code>#!/usr/bin/env bash
  exec java -javaagent:./newrelic/newrelic.jar -Djava.security.egd=file:/dev/./urandom $BOOTAPP_JAVA_OPTS -jar -Dspri
  ng.profiles.active=$ENV_NAME $BOOTAPP_PATH --server.port=$SERVER_PORT &gt; /dev/stdout 2&gt;&amp;1
  </code></pre>