-
Notifications
You must be signed in to change notification settings - Fork 234
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
Alpine based image for sbt-scala #277
Conversation
The purpose of that step is to make sure sbt preloads the scala version. Should improve sbt project load time. On the other hand if you have a proper ci build cache in place it does not matter so much as it only happens on the first build. |
So, what are the changes you want? |
Looks like the build is still failing
What will you be using the image for? Do you want it to be as small as possible and will you only be using sbt? |
In my specific use case, I am running https://github.com/lichess-org/lila-docker which has atleast 4 images that rely on your sbt-scala images ( namely lila, lila-ws, lila-search and lila-engine). This is the dockerfile for lila-ws. We would still need scala. Since we use four different images, this reduction in size becomes significant. |
The tests have passed I am now removing |
Ok never mind, this seems to be a dev container. |
So you care more about size than startup time? |
No, I guess the startup time is essential too. I just didn't know by then what the warming stage do. |
I you consider this done I'm OK to merge. |
Its done on my end.👍 |
One more thing, can you remove the JDK 11 build? I plan to remove all those builds as jdk 11 primary support period has ended. By the way, Lichess is amazing. |
Ok, I will remove it we don't use it anyway. (Just the alpine one or the other ones too?)
I agree, but I am not a maintainer just a contributor. |
Just the alpine one |
Done👍 |
Comparison:
docker images
The image
eclipse-temurin-jammy-21.0.2_13
with base imageeclipse-temurin:21.0.2_13-jdk
is 977MBThe new image is 792MB
But moving
this code to build stage reduces the image size to 552MB (That still works good though I am not sure what will be the downside of moving this to build stage).
Currently this pr has it outside of build stage I will move it to build stage to reduce size if you say so. The link to that branch is https://github.com/Carbrex/docker-sbt/blob/warm-stage-in-build/eclipse-temurin/alpine.Dockerfile
I have also not been able to check for the build.yml changes as I dont know how to run them. Your help would be appreciated.
Thanks for your time!
Closes #276