dnf clean after dnf install in Dockerfiles#948
dnf clean after dnf install in Dockerfiles#948PeterDaveHello wants to merge 1 commit intocaronc:masterfrom
dnf clean after dnf install in Dockerfiles#948Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #948 +/- ##
=======================================
Coverage 99.52% 99.52%
=======================================
Files 123 123
Lines 16353 16353
Branches 3327 3327
=======================================
Hits 16276 16276
Misses 68 68
Partials 9 9 ☔ View full report in Codecov by Sentry. |
|
Thanks for these changes. It's worth noting that there are test build environments only (for unit tests). So there isn't a huge gain from your great finds. Shrink this docker container and we've got more of a rewarding outcome |
| 'dnf-command(builddep)' sudo rsync rpmdevtools; \ | ||
| dnf config-manager --set-enabled powertools; | ||
| dnf config-manager --set-enabled powertools; \ | ||
| dnf clean all; |
There was a problem hiding this comment.
This clean all is not needed, it slows down the second dnf install below
There was a problem hiding this comment.
It could be! Depends on the network environment and the upstream server being used.
The better way may be to merge those installs, so that the process will be fast, and the image will be slow?
There was a problem hiding this comment.
Just getting back to this, i think the containers referenced are gone. The fedora and el9 containers are only used to build an rpm and then exit. Your change can be applied to them if you want, but as the last entry after last install
|
Will close this issue off; was trying to point out that your |
This ensures that
dnfdoesn't leave unnecessary temporary files in the Docker images, thereby reducing their size.Regarding the change in image size, it seems there isn't much difference for the rawhide and f39 builds. However, the f38 and el8 builds have shown significant improvement.
For the image size changes, see the result below.
Before:
After: