title: How write correctly a Docker file to build war file and run spring-boot maven project?
body: <p><strong>Dockerfile:</strong></p>
  <pre><code>FROM maven:3.6.3-jdk-11
  
  RUN mvn clean install
  
  RUN mvn spring-boot:run
  </code></pre>
  <p>Then run,</p>
  <pre><code>$ docker image build -t  hello-world .
  </code></pre>
  <p><strong>when i run above command then following error would occurred.</strong></p>
  <p>Sending build context to Docker daemon  206.6MB</p>
  <p>Step 1/3 : FROM maven:3.6.3-jdk-11
  ---&gt; 918519009705</p>
  <p>Step 2/3 : RUN mvn clean install
  ---&gt; Running in d915d2ac25e7</p>
  <p>[INFO] Scanning for projects...</p>
  <p>[INFO] ------------------------------------------------------------------------</p>
  <p>[INFO] BUILD FAILURE</p>
  <p>[INFO] ------------------------------------------------------------------------</p>
  <p>[INFO] Total time:  0.153 s</p>
  <p>[INFO] Finished at: 2020-07-11T12:33:30Z</p>
  <p>[INFO] ------------------------------------------------------------------------</p>
  <p>[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (/). Please verify you invoked Maven from the correct directory. -&gt; [Help 1]</p>
  <p>[ERROR]
  [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.</p>
  <p>[ERROR] Re-run Maven using the -X switch to enable full debug logging.</p>
  <p>[ERROR]
  [ERROR] For more information about the errors and possible solutions, please read the following articles:</p>
  <p>[ERROR] [Help 1] <a href="http://cwiki.apache.org/confluence/display/MAVEN/MissingProjectException" rel="nofollow noreferrer">http://cwiki.apache.org/confluence/display/MAVEN/MissingProjectException</a></p>
  <p><strong>Now, Can you explain a proper way to build(.war file) and run a maven project using docker image for windows?</strong></p>