Why exactly is this repackage needed in this Docker and Spring sample?

  docker, java, maven, spring, spring-boot

This question isn’t about errors but rather to gain understanding. So I’ve a spring boot project that will generate a Docker image based upon it. Basically the structure is quite simple :

      target (..where..the theProject.war generated)

You see the Docker folder there. There’s a Dockerfile within it plus theProject.war that I copied from the target.

Dockerfile contains such:

FROM openjdk:8-alpine
ARG JAR_FILE=target/*.jar
COPY ${JAR_FILE} app.jar
ENTRYPOINT ["java", "-jar", "/app.jar"]

What I confuse is that what exactly this block in the pom.xml does


I understand a little bit that it means to repackage then copy theProject.war into the docker folder. Is that what it means? But then which docker folder ? I only have a Docker folder?. Could you please help me to understand it. And bringing light to my dark head?

Source: Docker Questions