jib: Spring Boot Application containerizes but Tomcat Server doesn't start
Description of the issue:
- Create a Rest service w/ Spring Boot, and add Jib to Maven
pom.xml. - Validate that local run, default port 8080 is exposed.
- Run `jib:build
- Run the created container image
- Notice the port isn’t opened. Tomcat didn’t start.
Expected behavior: Created image should behave like the JAR.
Steps to reproduce:
- Build application here: https://github.com/saturnism/spring-cloud-gcp-guestbook/tree/master/11-kubernetes/guestbook-frontend
- Build container w/ Jib.
- Notice the port isn’t opened.
Environment: MacOS, Maven
jib-maven-plugin Configuration:
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<version>0.9.6</version>
<configuration>
<to>
<image>gcr.io/.../guestbook-frontend</image>
</to>
</configuration>
</plugin>
Log output: Normal Startup w/o Jib
2018-07-17 14:09:02.191 INFO [-,,,] 60312 --- [ main] o.s.i.endpoint.EventDrivenConsumer : started _org.springframework.integration.errorLogger
2018-07-17 14:09:02.485 INFO [-,,,] 60312 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ''
2018-07-17 14:09:02.488 INFO [-,,,] 60312 --- [ main] c.example.frontend.FrontendApplication : Started FrontendApplication in 9.774 seconds (JVM running for 10.318)
Failed startup w/ Jib
springframework.integration.errorLogger} as a subscriber to the 'errorChannel' channel
2018-07-17 18:05:09.937 INFO [-,,,] 1 --- [ main] o.s.i.channel.PublishSubscribeChannel : Channel 'application-1.errorChannel' has 1 subscriber(s).
2018-07-17 18:05:09.937 INFO [-,,,] 1 --- [ main] o.s.i.endpoint.EventDrivenConsumer : started _org.springframework.integration.errorLogger
2018-07-17 18:05:09.967 INFO [-,,,] 1 --- [ main] c.example.frontend.FrontendApplication : Started FrontendApplication in 9.085 seconds (JVM running for 9.892)
Additional Information:
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 20 (15 by maintainers)
Ah I found it: @saturnism
The scope is set to
provided, but should be none/compile.