apt-get install --no-install-recommends
I learned about apt-get install’s “–no-install-recommends” flag, and I used it to prevent unnecessary “recommended” packages from getting installed. This helped reduce some unnecesary bloat in a Docker image.
More details: https://ubuntu.com/blog/we-reduced-our-docker-images-by-60-with-no-install-recommends