-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
docker: reduce ubi8 images size by using ubi8-minimal as base #12797
docker: reduce ubi8 images size by using ubi8-minimal as base #12797
Conversation
Continuous Integration Result: SUCCESSFULContinuous Integration Result: SUCCESSFULCongratulations, this patch passed basic tests Tested-by: NetDEF / OpenSourceRouting.org CI System CI System Testrun URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-9643/ This is a comment from an automated CI system. |
Thank you for the PR. Out of curiosity, are you using this image? If so, what for? |
Hi! I'm part of the IBM team, perhaps you know some of my peers @rampxxxx @lynnemorrison . We're using these images in our project, and found out that |
Why not use our maintained docker image built on top of Alpine? |
We have several services that we base on ubi8-minimal, and keep moving forward the base image as security fixes are released for them. Keeping the same base image simplifies our operations. Also, we sometimes have private paches that we test before they get to upstream, or we base them just on stable versions (while upstream moves them to master), so we prefer to build our own image. |
Thank for the info! The purpose of my questions is to find out who's using what images for what purpose. I'm not sure I fully understand a couple points in your response:
I understand this to mean that you have containers that you maintain that uses
This part lost me - you're speaking of your experience with the images your team maintains, right? And saying that based on your good experience with I know this is a lot of questions but personally I'm not sure where these ubi8 images came from in the first place, and as I concern myself mostly with maintaining the docker images for this project these days, I'm gathering info. |
No problem, that is fair and maybe I did not explain myself clearly.
Right, I refer to the images that we maintain, which are based on this very same We have our private fork of FRR, which is quite close to upstream. Actually, now we are updating to use FRR 8.4.2 and the delta with upstream, except for some stuff to use our internal infrastructure, is just this PR. We build our FRR images, which are subsequently used as base images for another service. Apart from this component, there are other services in our product that are also packaged as containers, and all of them use the same base image, this is why I meant by "simplifying our operations" when updating the base image.
You are again on the right track, I am speaking about our own images, but they use this very same Dockerfile, verbatim. Initially we used We have been using I hope that I clarified your points now, if you have any further doubt don't hesitate on asking ;) |
The builder for docker images based on ubi-8 images is broken, and it generates docker images that are heavy and contain more artifacts than they need to. It also installs RPM packages from CentOS that, although seem to be compatible with ubi-8, may diverge at some point (remember that CentOS now does not track RHEL closely). Signed-off-by: Juan Vidal Allende <juan.vidal1@ibm.com>
Docker image based on ubi8-minimal are smaller in size than previous ones built with ubi8 as base. Also, due to proper cleanup of caches, the final image is about 400MB in size (down from ~630MB using the older ubi8 builder). This Dockerfile also uses packages built for RHEL (instead of CentOS), and updates dependencies so that it can compile latest FRR versions. Signed-off-by: Juan Vidal Allende <juan.vidal1@ibm.com>
cf2960e
to
b964031
Compare
Continuous Integration Result: SUCCESSFULCongratulations, this patch passed basic tests Tested-by: NetDEF / OpenSourceRouting.org CI System CI System Testrun URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-9787/ This is a comment from an automated CI system. |
@qlyoung do you have any further questions or comments regarding this PR? Is there anything that I can do to push it forward? |
@jvidalallende Apologies for the delay here, I forgot to check in on this one. |
Sincerely apologize for the 2 month delay. I have all my Github notifications off otherwise I get way too many emails. It should never take this long. Thank you for the patch. |
No problem, better late than never! Thanks for going through it! |
This PR changes the base image from ubi-8 to ubi8-minimal, which has smaller size and a simpler package manager. By using this base image and properly cleaning caches, the final image size has been shrinked to about 65% of its original size, from 630MB to 400MB (note that comparison is done with ubi-8 building version
46eb7c8808
and ubi8-minimal building latestHEAD
as of submitting this PR).The ubi8-minimal Dockerfile also uses packages built from RHEL, as opposed to the previous ubi-8 Dockerfile which used packages built for CentOS.