-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Some debian package manager tweaks #8681
Conversation
By default, Ubuntu or Debian based "apt" or "apt-get" system installs recommended but not suggested packages . By passing "--no-install-recommends" option, the user lets apt-get know not to consider recommended packages as a dependency to install. This results in smaller downloads and installation of packages . Refer to blog at [Ubuntu Blog](https://ubuntu.com/blog/we-reduced-our-docker-images-by-60-with-no-install-recommends) .
By default, Ubuntu or Debian based "apt" or "apt-get" system installs recommended but not suggested packages . By passing "--no-install-recommends" option, the user lets apt-get know not to consider recommended packages as a dependency to install. This results in smaller downloads and installation of packages . Refer to blog at [Ubuntu Blog](https://ubuntu.com/blog/we-reduced-our-docker-images-by-60-with-no-install-recommends) .
By default, Ubuntu or Debian based "apt" or "apt-get" system installs recommended but not suggested packages . By passing "--no-install-recommends" option, the user lets apt-get know not to consider recommended packages as a dependency to install. This results in smaller downloads and installation of packages . Refer to blog at [Ubuntu Blog](https://ubuntu.com/blog/we-reduced-our-docker-images-by-60-with-no-install-recommends) .
By default, Ubuntu or Debian based "apt" or "apt-get" system installs recommended but not suggested packages . By passing "--no-install-recommends" option, the user lets apt-get know not to consider recommended packages as a dependency to install. This results in smaller downloads and installation of packages . Refer to blog at [Ubuntu Blog](https://ubuntu.com/blog/we-reduced-our-docker-images-by-60-with-no-install-recommends) .
By default, Ubuntu or Debian based "apt" or "apt-get" system installs recommended but not suggested packages . By passing "--no-install-recommends" option, the user lets apt-get know not to consider recommended packages as a dependency to install. This results in smaller downloads and installation of packages . Refer to blog at [Ubuntu Blog](https://ubuntu.com/blog/we-reduced-our-docker-images-by-60-with-no-install-recommends) .
By default, Ubuntu or Debian based "apt" or "apt-get" system installs recommended but not suggested packages . By passing "--no-install-recommends" option, the user lets apt-get know not to consider recommended packages as a dependency to install. This results in smaller downloads and installation of packages . Refer to blog at [Ubuntu Blog](https://ubuntu.com/blog/we-reduced-our-docker-images-by-60-with-no-install-recommends) .
Welcome @Rajpratik71! |
Hi @Rajpratik71. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Rajpratik71 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/ok-to-test |
almost every test passed , one unrelated test "pull-kops-e2e-kubernetes-aws" related to storage failed with error "FailedMount: Unable to attach or mount volumes: ". Here , i mentioned unrelated because i think my commit doesn't contain any changes related to this. |
Looking at the protokube-builder image for example, this is the difference in packages being installed: before:
after:
leaving a difference of:
While I agree we should definitely use |
and yes the e2e aws test is definitely unrelated, it can be flaky sometimes. Thanks for doing this! /retest |
I agree with the point of "ca-certificates" is needed as besides this i saw many others CI builds failing in the absence of "ca-certificates" , as wget throws certificate error. For that here , i proposing to add "ca-certificates" in the every possible script and dockerfile and also like to add "apt-utils" package as in ci build log . it taking a lot of time while configuring package after downloading . |
Because Github CI build is 1. Slow and in log it is showing because "apt-utils" not installed 2. to avoid CI build to exits with error without having certificate
Because Github CI build is 1. Slow and in log it is showing because "apt-utils" not installed 2. to avoid CI build to exits with error without having certificate
Because CI build is 1. Slow and in log it is showing because "apt-utils" not installed 2. to avoid CI build to exits with error without having certificate
Because CI build is 1. Slow and in log it is showing because "apt-utils" not installed 2. to avoid CI build to exits with error without having certificate
Because Github CI build is 1. Slow and in log it is showing because "apt-utils" not installed 2. to avoid CI build to exits with error without having certificate
Because Github CI build is 1. Slow and in log it is showing because "apt-utils" not installed 2. to avoid CI build to exits with error without having certificate
Thanks for doing this @Rajpratik71! This is looking pretty good, once you feel this is ready to merge, could you make sure you merge things, I think this could likely all be a single commit or two depending on how you'd like to logically break up your changes? Thanks! |
By default, Ubuntu or Debian based "apt" or "apt-get" system installs recommended but not suggested packages . By passing "--no-install-recommends" option, the user lets apt-get know not to consider recommended packages as a dependency to install. This results in smaller downloads and installation of packages . Refer to blog at [Ubuntu Blog](https://ubuntu.com/blog/we-reduced-our-docker-images-by-60-with-no-install-recommends) . Some debian package manager tweaks By default, Ubuntu or Debian based "apt" or "apt-get" system installs recommended but not suggested packages . By passing "--no-install-recommends" option, the user lets apt-get know not to consider recommended packages as a dependency to install. This results in smaller downloads and installation of packages . Refer to blog at [Ubuntu Blog](https://ubuntu.com/blog/we-reduced-our-docker-images-by-60-with-no-install-recommends) . Some debian package manager tweaks By default, Ubuntu or Debian based "apt" or "apt-get" system installs recommended but not suggested packages . By passing "--no-install-recommends" option, the user lets apt-get know not to consider recommended packages as a dependency to install. This results in smaller downloads and installation of packages . Refer to blog at [Ubuntu Blog](https://ubuntu.com/blog/we-reduced-our-docker-images-by-60-with-no-install-recommends) . Some debian package manager tweaks By default, Ubuntu or Debian based "apt" or "apt-get" system installs recommended but not suggested packages . By passing "--no-install-recommends" option, the user lets apt-get know not to consider recommended packages as a dependency to install. This results in smaller downloads and installation of packages . Refer to blog at [Ubuntu Blog](https://ubuntu.com/blog/we-reduced-our-docker-images-by-60-with-no-install-recommends) . Some debian package manager tweaks By default, Ubuntu or Debian based "apt" or "apt-get" system installs recommended but not suggested packages . By passing "--no-install-recommends" option, the user lets apt-get know not to consider recommended packages as a dependency to install. This results in smaller downloads and installation of packages . Refer to blog at [Ubuntu Blog](https://ubuntu.com/blog/we-reduced-our-docker-images-by-60-with-no-install-recommends) . Some debian package manager tweaks By default, Ubuntu or Debian based "apt" or "apt-get" system installs recommended but not suggested packages . By passing "--no-install-recommends" option, the user lets apt-get know not to consider recommended packages as a dependency to install. This results in smaller downloads and installation of packages . Refer to blog at [Ubuntu Blog](https://ubuntu.com/blog/we-reduced-our-docker-images-by-60-with-no-install-recommends) .
Because Github CI build is 1. Slow and in log it is showing because "apt-utils" not installed 2. to avoid CI build to exits with error without having certificate added packages apt-utils ca-certificates Because Github CI build is 1. Slow and in log it is showing because "apt-utils" not installed 2. to avoid CI build to exits with error without having certificate added packages apt-utils ca-certificates Because CI build is 1. Slow and in log it is showing because "apt-utils" not installed 2. to avoid CI build to exits with error without having certificate added packages apt-utils ca-certificates Because CI build is 1. Slow and in log it is showing because "apt-utils" not installed 2. to avoid CI build to exits with error without having certificate added packages apt-utils ca-certificates Because Github CI build is 1. Slow and in log it is showing because "apt-utils" not installed 2. to avoid CI build to exits with error without having certificate added packages apt-utils ca-certificates Because Github CI build is 1. Slow and in log it is showing because "apt-utils" not installed 2. to avoid CI build to exits with error without having certificate
As requested , created a clean PR #8687 , including all the changes of this PR in two commit . Feel free to merge which one you want |
I did a quick test to see how this helps with
To get some meaningful results the images should be based on a
|
This "--no-install-recommends" is , included in one of the best practices of Docker . Talking about difference in size of images , it vary from one images with few packages to some other images with many layers and a lot of other packages are installed as per requirements . Switching to "*-slim" version of Docker good at first sight but for larger projects , we have to check packages dependencies manually if not present in image and not satisfied automatically with package managers. |
@Rajpratik71 I agree that installing less packages is a good thing in general. Usually it's done for reducing the image size. In this case I would at least add the We can explore using the slim images when we have some more time to test. |
Ya , these are the two more ways we can further optimize and test them when possible. |
@rifelpet @mikesplain requesting review |
Can this be closed as a duplicate of #8687? |
yes |
By default, Ubuntu or Debian based "apt" or "apt-get" system installs recommended but not suggested packages .
By passing "--no-install-recommends" option, the user lets apt-get know not to consider recommended packages as a dependency to install.
This results in smaller downloads and installation of packages .
Refer to blog at Ubuntu Blog .