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

Optimize Dockerfile #77

Open
FelixJacobsen opened this issue Mar 21, 2022 · 2 comments
Open

Optimize Dockerfile #77

FelixJacobsen opened this issue Mar 21, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@FelixJacobsen
Copy link
Contributor

Optimize dockerfile
Good source: https://spring.io/guides/gs/spring-boot-docker/

@LordRekishi LordRekishi added the enhancement New feature or request label Mar 26, 2022
@LordRekishi
Copy link
Contributor

One addition to this optimization could be to use the maven wrapper instead of using maven in the Dockerfile, if this is even possible.

@LordRekishi
Copy link
Contributor

Some advice from Martin about this issue!

[15:28] Martin Blomberg
Steg ett är att utgå från en mer optimerad image än openjdk:17 som base för den färdiga imagen.

[15:30] Martin Blomberg
Finns väl inte som openjdk utan man får välja någon annan distribution

[15:30] Martin Blomberg
https://hub.docker.com/_/eclipse-temurin/?tab=tags&page=1&name=jre

[15:31] Martin Blomberg
En annan förbättring är att inte producera en jar fil utan istället bara kompilera och kopiera över kataloger från target till imagen ni ska bygga. Där man kopierar det som ändras mest sällan först för att slippa ändringar i docker imagens lager.

[15:32] Martin Blomberg
https://spring.io/guides/gs/spring-boot-docker/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Week 14 (proposed v2.0.0 release)
Development

No branches or pull requests

2 participants