-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Build docker images based on Red Hat UBI #20576
Conversation
💚 Build SucceededExpand to view the summary
Build stats
Test stats 🧪
Steps errorsExpand to view the steps failures
|
/packaging |
8d33902
to
6cf2143
Compare
/packaging |
46ebfa6
to
b7ef2b0
Compare
Pinging @elastic/integrations (Team:Integrations) |
Pinging @elastic/integrations-platforms (Team:Platforms) |
/packaging |
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 don't know enough to review the agent bits, but the rest looks good. Thanks!
Just one minor question around the labels, which we might not want in non-UBI images. Probably doesn't matter though.
Pinging @elastic/ingest-management (Team:Ingest Management) |
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.
LGTM.
|
||
var requiredPackages []string | ||
for _, p := range platformPackages { | ||
if _, enabled := devtools.Platforms.Get(p.platform); enabled { |
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.
👍
@blakerouse can you take a look? |
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.
Looks good
if err != nil { | ||
// specific missing fallback to generic | ||
dockerfile = "Dockerfile.tmpl" | ||
dockerfile := "Dockerfile.tmpl" |
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.
👍
Add an additional docker build that builds images based on Red Hat UBI, following Red Hat requirements for certified images. Additional checks have been added to packaging tests for labels and licenses. Additional changes done to support it also in Elastic Agent images: * Home directory is prepared in a different stage (elastic#20356). * Allow the docker image to be run with random user ids (elastic#18873). * Explicitly select a Dockerfile and entry point template. * Add NOTICE.txt file to all agent packages. * Actually run package tests after building packages, added flag to allow root user. * Improved checks on required packages, so they are not re-built if they already are. (cherry picked from commit e31794d)
Add an additional docker build that builds images based on Red Hat UBI, following Red Hat requirements for certified images. Additional checks have been added to packaging tests for labels and licenses. Additional changes done to support it also in Elastic Agent images: * Home directory is prepared in a different stage (#20356). * Allow the docker image to be run with random user ids (#18873). * Explicitly select a Dockerfile and entry point template. * Add NOTICE.txt file to all agent packages. * Actually run package tests after building packages, added flag to allow root user. * Improved checks on required packages, so they are not re-built if they already are. (cherry picked from commit e31794d)
Add an additional docker build that builds images based on Red Hat UBI, following Red Hat requirements for certified images. Additional checks have been added to packaging tests for labels and licenses. Additional changes done to support it also in Elastic Agent images: * Home directory is prepared in a different stage (elastic#20356). * Allow the docker image to be run with random user ids (elastic#18873). * Explicitly select a Dockerfile and entry point template. * Add NOTICE.txt file to all agent packages. * Actually run package tests after building packages, added flag to allow root user. * Improved checks on required packages, so they are not re-built if they already are.
What does this PR do?
Add an additional docker build that builds images based on Red Hat UBI, following Red Hat requirements for certified images.
Additional checks have been added to packaging tests for labels and licenses.
Additional changes done to support it also in Elastic Agent images:
-oss
,-ubi8
...).NOTICE.txt
file to all agent packages.NOTE: Some of the changes for Elastic Agent could be actually moved to separate PRs, but they are quite intertwined and I would like to test them together. I decided to do them on this PR to don't have to conditionally disable package tests, and to be able to test everything together. But happy to move them to other PRs if preferred.
Why is it important?
To build images that can be certified for Red Hat OpenShift.
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Author's Checklist
/licenses
Possibly to be done in a follow up PR
How to test this PR locally
Related issues