-
Notifications
You must be signed in to change notification settings - Fork 495
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
Security optimizations for the container base image #10672
Conversation
The Ubuntu specific wrappers "adduser" and "addgroup" have been removed with Ubuntu 24.04. Also, lets be more compatible with LSB this way.
It was left as "root" by accident, but should obviously be not.
Also delete some unused packages like gpg and dirmngr
- The entrypoint now defines two locations, which can be overridden by a user _without_ implicitely trying to execute these scripts. - The entrypoint now _removes_ any files found at these locations to _always_ start with a clean slate. Otherwise stale files might be looped over and over again. - A consequence of this: any kind of commands to be included must be provided via a script and cannot be provided by some initial file. - The configuration scripts no longer leave temporary files dangling and avoid these files if possible. Instead, we are injecting statements into these files while checking for duplicates as a safety measure.
…application Setting these env vars when reloading are highly application specific and shall not reside in the base image.
- Provide env vars for admin, linux user and domain master password. - These are set to the publicly known values, good enough for development or demo purposes. - For production purposes, these variables will be used to change passwords at run/boottime of the container. - As of this commit, do _not_ leave any password lying around in files, which could be exploited.
A new init script allows to set passwords at boot time of the container. If the passwords are not changed, there will be warnings logged about the default in use. Slightly modifying the startInForeground.sh script to avoid keeping password files or sensitive passwords around after starting the server.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Aligning configbaker and base image with same tool. wait4x has much more features to wait for different services.
As per https://docs.docker.com/reference/dockerfile/#automatic-platform-args-in-the-global-scope BuildKit / buildx will expose the target architecture. It requires adding an ARG in the Dockerfile to inject the data.
jattach binary is now available for ARM64 and AMD64, but requires special handling with download URLs and checksums.
Variable names related to user, password, and domain in Dockerfile and scripts have been modified for better clarity and consistency. This includes changing the names of admin user and password, domain master password, and Linux password and user.
Also includes a release note
I think this is ready for review! Putting it in ready for sprint, as I don't know how fast we can act on it. |
This comment has been minimized.
This comment has been minimized.
Unfortunately, I get the dreaded We saw this error before: To fix this, I bumped to this version: |
|
Hmm, when I run
|
This reverts commit 146c927. We can't use 0.44 because of this error: "Unable to inspect image [solr:]" See https://github.com/fabric8io/docker-maven-plugin/issues/1756e
📦 Pushed preview images as
🚢 See on GHCR. Use by referencing with full name as printed above, mind the registry name. |
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.
I tested this on Rocky 8 (my dev3 server) and it seems to work fine. Merging.
Thanks for testing and merging! Much appreciated, as always! ❤️ |
Thanks for the PR! There's a lot in here! 😄 |
What this PR does / why we need it:
This issue addressed some flaws I found that are security related as well as enabling better compatibility with OpenShift and Kubernetes.
Which issue(s) this PR closes:
Special notes for your reviewer:
None
Suggestions on how to test this:
Run them locally in Docker:
To test changing the passwords, you need to add the documented settings to the compose file as env vars.
Does this PR introduce a user interface change? If mockups are available, please link/include them here:
Nope
Is there a release notes update needed for this change?:
Included.
Additional documentation:
🔋 included