-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Improve build process for arbitrary-users-patch'd images for Brew compatibility #14623
Comments
Thanks to a pointer from @skabashnyuk I've found this is done in https://github.com/eclipse/che-devfile-registry/blob/master/arbitrary-users-patch/build_images.sh#L37 as part of a patch set that @amisevsk created to produce 12 new images based on upstream, but with support for arbitrary users (req'd by Openshift). So... yeah. This is going to be an interesting exercise to turn into something we can build the Red Hat Way (in Brew, with Errata/Comet, etc.) @amisevsk how do you feel about migrating these to use UBI8 instead of https://hub.docker.com/_/maven ? Also could we standardize on the same JDK version as used in these two images? |
I've updated both
Next, here's a fork of che-devfile-registry/arbitrary-users-patch which works with UBI8 and should also work in Brew (once maven tarball is pushed to dist-git): https://github.com/nickboldt/containers/tree/master/ubi8-arbitrary-users-patch For those already saying "UBI is too big!" let me show some file sizes from my locally built versions of the ubuntu/debian-based images vs. my UBI8 based ones:
Or looking at the sizes as show in in Quay: Existing Ubuntu/Debian-based ones:
vs the UBI8 versions:
Additionally, I see these remote plugins are even bigger in my registry:
So... what if we used the same image for both the remote plugin and the jdk-maven container? Could one image do both things (eg., one has a default entrypoint, and the other we override when loading the container) ? If so that would: a) reduce the amount of stuff being downloaded to start the first JDK container (JDK8: 499M + 587M, JDK11: 825M + 762M) b) reduce the number of images to build / publish via CI, and maintain downstream as supported CRW images. |
@nickboldt some good things here:
I have breifly reviewed https://github.com/nickboldt/containers/tree/master/ubi8-arbitrary-users-patch and there is some misunderstanding. The content of the current folder As already mentioned on a call, one of the goal was to used some base images maintained by third party teams instead of doing it ourselves. |
The image for the plugin container is determined by the plugin metadata. The image for the jdk-maven-container comes from the devfile. There are many devfiles, but only one plugin, so we would push the responsiblity for ensuring the plugin prerequisites are installed to the author of the devfile. Maybe I'm not understanding the ide here, but I don't think that is desirable. |
If by "beautiful" you mean "works in OpenShift" because Openshift uses a randomly assigned userid and this gets around that design choice... then yes, it's more beautiful this way. :)
There is no such thing as a JDK 11 or 8 image based on UBI8 that includes Maven 3.6. I've looked at https://hub.docker.com/_/maven and RHCC and I haven't found anything that uses Maven 3.6, but there are some with 3.5.4. Of those, I'm not sure the images are smaller, or OpenShift friendly. Here are some:
https://access.redhat.com/containers/?tab=docker-file#/registry.access.redhat.com/openjdk/openjdk-8-rhel8/images/1.0-7 ** (both run as user 185, not an anonymous anyid user for Openshift compatibility)
Ah, but che-dockerfiles is deprecated, is it not? And since these are all related to the devfile registry, having them built as part of the devfile release makes a certain amount of sense. |
We are not looking for the smallest image if we do not replace the community images (ubuntu/alpine/centos). We just need to add some more enterprise friendly images (ubi/rhel/centos) to the
We are not looking for OpenShift friendly image neither because the script
We wanted to deprecate the che-dockerfiles repository because we didn't want to maintain the sample stacks images but using the "official" community images. But, if for some reason, we cannot find a valid third party image we should still use che-dockerfile. And none of the base images is built as part of the devfile-registry CI, only the patched images are. Hence I would rather be consistent with that approach. |
@tsmaeder I mean that the mvn jdk8 sample stack image should match (or be based on) the java8 plugin image. And it should be the same for most of the samples stacks (python, php, golang, dotnet, nodejs...). Let's discuss that here. |
My idea behind the arbitrary users patch is mainly that you can put whatever you want in there; it's container agnostic for the most part. I'm strongly against adding any custom image- or runtime-specific modifications there (e.g. installing/configuring maven), since that greatly increases the complexity. The only thing that happens in the arb users patch is working around OpenShift limitations, and the entire point is that you can list any image you want and have it build a version that will work on OpenShift. If we require e.g. a ubi8 image with maven and jdk11, we need to build it elsewhere and use it as a base image to be patched. |
Proposal for making this arbitrary user patching compatible with Brew process:
And we need:
|
Since we're now reusing 7 stack images and only have 2 new side car images, the above process may instead be simplified to:
|
Out of time to contribute rhel.Dockerfiles upstream, and many depend on rhel8 (not ubi8) containers, so they won't be accepted due to the "registry.redhat.io is authenticated and can't be used" rule. Therefore closing, partially complete. |
Describe the bug
As an extender of Che 7, I need to be able to rebuild these images:
But there appears to be no documentation and no obvious Dockerfiles for how to build these images. I've checked all the eclipse/che-* repos in GH, and I can't find any sources for these. Yet some CI process is definitely producing them from somewhere, as the latest tag in Quay is only 19hrs old.
These are built from https://github.com/eclipse/che-devfile-registry/tree/master/arbitrary-users-patch but the process is not compatible with rhplg/brew builds.
Expected behavior
Need to produce a clear and concise description of how to build these, with links to the Dockerfiles.
See also #14545
The text was updated successfully, but these errors were encountered: