https://github.com/shaman007/Dockerfiles – Dockerfiles for my setup!
https://github.com/shaman007/home-k3s – k8s (well, k3s) YAMLs I have to run everything.
https://github.com/shaman007/Dockerfiles – Dockerfiles for my setup!
https://github.com/shaman007/home-k3s – k8s (well, k3s) YAMLs I have to run everything.
by
Tags:
It doesn’t make sense to run “apt-get remove” and other cleanup commands on different “RUN” lines, because every “RUN” command creates a different docker layer and keeps all the unnecessary files in it. Do all the software installation and cleanup in one run, it’ll save a few dozen MB’s in image size. Like this:
RUN apt update && apt install rsyslog -y && apt-get remove -y git && apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
Will do!
Yeah, saved some bytes! Thanks for the tip!
Leave a Reply