title: Spring boot app not available when deployed in EC2 using docker - Error 404
body: <p>I'm using spring boot web app. It was working fine in tomcat server 8.0 running on my desktop PC</p>
  
  <p>URL used: <code>http://{desktop_ip}:8080/tennis/</code></p>
  
  <p>Now i'm trying to deploy the same war using docker running in EC2 instance</p>
  
  <p>i copied the war to EC2 instance and deployed using below command</p>
  
  <pre><code>sudo docker run -it -p 8080:8080 -v tennis.war:/usr/local/tomcat/webapps/tennis.war -d tomcat:8.0
  </code></pre>
  
  <p>when i try to  access the application i'm getting <code>Error 404</code></p>
  
  <p>url used:  <code>http://{EC2_Public_ip}:8080/tennis/</code>
  but I'm able to access tomcat default examples app
         <code>http://{EC2_Public_ip}:8080/examples/</code></p>
  
  <p>So i'm assuming the IP and port are accessible</p>
  
  <p>In the logs i see the app is deployed with out any error</p>
  
  <p><strong>Logs</strong></p>
  
  <pre><code>    13-Sep-2019 05:33:39.587 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/local/tomcat/webapps/docs] has finished in [53] ms
      13-Sep-2019 05:33:39.590 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/usr/local/tomcat/webapps/examples]
      13-Sep-2019 05:33:40.295 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/usr/local/tomcat/webapps/tennis.war]
      13-Sep-2019 05:33:40.359 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/local/tomcat/webapps/tennis.war] has finished in [64] ms
      13-Sep-2019 05:33:40.369 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
  </code></pre>
  
  <p><strong>Access Log</strong></p>
  
  <pre><code>173.171.238.114 - - [13/Sep/2019:05:34:25 +0000] "GET /tennis/ HTTP/1.1" 404 1085
  173.171.238.114 - - [13/Sep/2019:05:34:39 +0000] "GET /tennis/ HTTP/1.1" 404 1085
  </code></pre>
  
  <p>I have also tried in docker tomcat 9.0 , but no luck</p>
  
  <p>Any suggestions please</p>