-
Notifications
You must be signed in to change notification settings - Fork 799
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
Add a jupyterhub/k8s-hub-slim image alongside jupyterhub/k8s-hub #2920
Conversation
0df8a4b
to
7de20b7
Compare
@manics commented in #2921 that has this PR bundled with it. |
44f3e26
to
eb2fed8
Compare
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The hub change looks fine to me. I've made some optional suggestions on wording to the docs and comments.
I've been wondering what the purpose of the singleuser image is? If it's just for testing do we need the complex optimised build process?
Co-authored-by: Simon Li <[email protected]>
Thanks for your review @manics, great suggestions also!!!
Kind of, for aarch64 we need to have the python package installation or wheel building done in a base image where compilers are available as pycurl for example isn't available as a wheel for aarch64 I recall. So, we could go for a final image without slim. At the same time, the incremental code complexity isn't soo high, because we provide the exact same build stage in the hub's docker image currently. Also the speed of building this image is higher I think. The reason is that you can do pip wheel building at the same time as you do I'm also fond of it now as I see it as a robust pattern to promote elsewhere, and due to that, is good to have visible in more than just where its most useful. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
jupyterhub/zero-to-jupyterhub-k8s#2920 Merge pull request #2920 from consideRatio/pr/add-hub-slim
The jupyterhub/k8s-hub-slim image is tested in the (stable, install) job now - it works fine and I think we don't need anything more in tooling etc, just another chartpress.yaml configuration entry.
This PR stems from a discussion in #2917 (comment). It also made me discover a chartpress bug in jupyterhub/chartpress#189.
Image size
Image vulnerabilities
Image build time
It seems we may end up with a significantly longer build time.
Conclusion
We drop 36% of the image size by removing these additional tools. In the case of using
python:3.9-bullseye-slim
as a base image still, we also drop a huge amount of since long unfixed known vulnerabilities.This PR also did not add notable complexity, and I think its very reasonable to go for this since no additional tooling was required and the Dockerfile is easy to understand still etc.
For considerations on using this as default image or similar, I suggest another issue/pr is to be opened.