Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Docker images size smaller #889

Closed
wajda opened this issue May 7, 2021 · 6 comments · Fixed by #952
Closed

Make Docker images size smaller #889

wajda opened this issue May 7, 2021 · 6 comments · Fixed by #952
Assignees
Milestone

Comments

@wajda
Copy link
Contributor

wajda commented May 7, 2021

Since more and more people are using Docker containers over standalone J2EE servers, I see no reason to continue supporting the later. We should switch to a lighter container (Spring boot?).

@wajda wajda added the Tech debt label May 7, 2021
@wajda wajda added this to the 1.0.0 milestone May 7, 2021
@cerveada
Copy link
Contributor

cerveada commented May 7, 2021

Spring boot packages a tomcat inside the jar that it creates. Isn't it actually more bulky?

I am not saying that it's a bad idea, but what is the goal here?

@wajda
Copy link
Contributor Author

wajda commented May 7, 2021

Oh, does it? So I didn't put that question mark for nothing :)) For some reason I thought Spring boot had its own http engine.
Maybe Play! then? We don't depend on Spring much anyway. I think any decent alternative would work. We need to do some research on this topic when we have time.

@wajda
Copy link
Contributor Author

wajda commented May 7, 2021

Just to clarify. I'm not against WAR-files, in fact I see a lot of strengths in this tech. I'm just wandering if there is anything more modern and significantly more lightweight in the micro-services and Docker era. But by default I'd stick with the current stack.

@cerveada
Copy link
Contributor

As far as I know Spring boot doesn't add many new features to spring. It mostly provides opinioned default configuration for all other spring parts that makes everything work out of the box.

In Boot, you can choose Tomcat, Jetty or Undertow as a servlet container.

An interesting alternative to Spring-MVC might also be Spring Web Reactive. Which claims to be functional and fully asynchronous. Spring Web Reactive by default runs on all mentioned servers plus on Netty server.

@wajda wajda self-assigned this Sep 2, 2021
@wajda
Copy link
Contributor Author

wajda commented Sep 2, 2021

As it turns out Tomcat slim image is already quite compact where the largest part is the OS layer. So no further image size optimization is needed at this stage IMO

@wajda
Copy link
Contributor Author

wajda commented Sep 2, 2021

I'll replace JDK with JRE and use -slim base image

@wajda wajda changed the title Replace Tomcat+WAR with a less bulky container Make Docker images size smaller Sep 2, 2021
wajda added a commit that referenced this issue Sep 2, 2021
@wajda wajda closed this as completed in #952 Sep 3, 2021
wajda added a commit that referenced this issue Sep 3, 2021
@wajda wajda added this to Spline Mar 31, 2022
@wajda wajda moved this to New in Spline Mar 31, 2022
@wajda wajda moved this from New to Closed in Spline Apr 2, 2022
wajda added a commit that referenced this issue Jul 28, 2023
wajda added a commit that referenced this issue Jul 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants