title: Docker&Java: building doesn't reflect the new files
body: <p>I've just started to use Docker and I don't know why the Wildfly's docker container doesn't have the latest files even though it copies the war. I have a JS file which I've changed things in it, but whenever I access <code>127.0.0.1:8080/static/js/myjs.js</code> I still get the older one even though I've <code>sudo mvn clean install</code> the app and then build the image.</p>
  
  <p>I've a docker-compose file which looks like this:</p>
  
  <pre><code>version: "3"
  services:
     app:
        build: 
           context: .
           dockerfile: ./docker/docker-app/Dockerfile
        ports:
           - "8080:8080"
        links:
           - "db:task_book_db"
        depends_on:
           - "db"
     db:
        image: mysql:5.7.22
        command: --default-authentication-plugin=mysql_native_password
        restart: always
        environment:
            - MYSQL_ROOT_PASSWORD=root
            - MYSQL_DATABASE=sample_db
            - MYSQL_USER=sample_usr
            - MYSQL_PASSWORD=sample_pw
        ports:
            - "3306:3306"
     start_dependencies: 
        image: dadarek/wait-for-dependencies
        depends_on:
           - "db"
  </code></pre>
  
  <p>I do <code>sudo docker-compose run --rm start_dependencies &amp;&amp; sudo docker-compose up --build app</code> and whenever I've changed something, I just stop the app container then I do <code>sudo docker-compose up --build app</code> again. I've read about volumes but I'm not sure how to use them yet.</p>