I'm studying Docker and image creation with JIB Maven plugin for Java applications.
The image is created successfully.
I create and run a container from the image. Success - the Web app starts fine.
I try to access the initial page of the Web app (login page). Success.
But when I do the login, the next JSP (welcome page) is not found (HTTP 404). I suspect that the JSPs from the application are not being copied to the image, hence the error.
Why is that? Is there any additional configuration to put on JIB?
When I run the application from Eclipse, it works just fine.
- The web application was created with Spring Boot and is packaged on JAR.
Here is my JIB config:
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<version>3.3.1</version>
<configuration>
<from>
<image>openjdk:alpine</image>
</from>
<to>
<image>${project.name}:${project.version}</image>
</to>
<container>
<mainClass>com.in28minutes.springboot.web.SpringBootFirstWebApplication</mainClass>
<creationTime>USE_CURRENT_TIMESTAMP</creationTime>
</container>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>dockerBuild</goal>
</goals>
</execution>
</executions>
</plugin>