Skip to content
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

fix(Dockerfile): Using --no-install-recommends (Optimization) #2329

Merged
merged 14 commits into from
Mar 2, 2020

Conversation

Rajpratik71
Copy link
Contributor

Using a --no-install-recommends when apt-get installing packages.

This will result in a smaller image size.

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this is a chore.
  • The title of the PR is (a) conventional, (b) states what changed, and (c) suffixes the related issues number. E.g. "fix(controller): Updates such and such. Fixes #1234".
  • I have written unit and/or e2e tests for my change. PRs without these are unlike to be merged.
  • Optional. I've added My organization is added to the README.
  • I've signed the CLA and required builds are green.

Using `--no-install-recommends` (Optimization)

Using a --no-install-recommends when apt-get installing packages.

This will result in a smaller image size.
Using `--no-install-recommends` (Optimization)

Using a --no-install-recommends when apt-get installing packages.

This will result in a smaller image size.
@alexec
Copy link
Contributor

alexec commented Feb 28, 2020

What is not installed by this change please? How much smaller is the image?

More cleanup tweaks using 

1. apt-get clean 

2. rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

removing downloaded packages and packages list will free up some space ,

results in smaller image size.
@codecov
Copy link

codecov bot commented Feb 29, 2020

Codecov Report

Merging #2329 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2329   +/-   ##
=======================================
  Coverage   13.38%   13.38%           
=======================================
  Files          70       70           
  Lines       24232    24232           
=======================================
  Hits         3244     3244           
  Misses      20579    20579           
  Partials      409      409

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update efb8a1a...bdcea40. Read the comment docs.

More cleanup tweaks using 

1. apt-get clean 

2. rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

removing downloaded packages and packages list will free up some space ,

results in smaller image size.
More cleanup tweaks using 

1. apt-get clean 

2. rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

removing downloaded packages and packages list will free up some space ,

results in smaller image size.
@Rajpratik71
Copy link
Contributor Author

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 .

Another Cleanup tweaks using

  1. apt-get clean

  2. rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

removing downloaded packages and packages list will free up some space ,

results in smaller image size.

Because Github CI build is 

1.  Slow and in log it is showing because "apt-utils" not installed 

2. CI build exits with error in having certificate
Because Github CI build is 

1.  Slow and in log it is showing because "apt-utils" not installed 

2. CI build exits with error in having certificate
Because Github CI build is 

1.  Slow and in log it is showing because "apt-utils" not installed 

2. CI build exits with error in having certificate
The  CI build end with error 

#7 12.12 curl: (77) error setting certificate verify locations:
#7 12.12   CAfile: /etc/ssl/certs/ca-certificates.crt
#7 12.12   CApath: /etc/ssl/certs

The fix for this i found is installing "ca-certificates" package for debian based systems
The  CI build end with error 

#7 12.12 curl: (77) error setting certificate verify locations:
#7 12.12   CAfile: /etc/ssl/certs/ca-certificates.crt
#7 12.12   CApath: /etc/ssl/certs

The fix for this i found is installing "ca-certificates" package for debian based systems
The  CI build end with error 

#7 12.12 curl: (77) error setting certificate verify locations:
#7 12.12   CAfile: /etc/ssl/certs/ca-certificates.crt
#7 12.12   CApath: /etc/ssl/certs

The fix for this i found is installing "ca-certificates" package for debian based systems
@alexec alexec merged commit 8672b97 into argoproj:master Mar 2, 2020
@alexec
Copy link
Contributor

alexec commented Mar 2, 2020

Great stuff!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants