Skip to content

Instantly share code, notes, and snippets.

@davedavis
Created October 13, 2020 20:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davedavis/3d43e9746310706e170b039c6ce2f9c9 to your computer and use it in GitHub Desktop.
Save davedavis/3d43e9746310706e170b039c6ce2f9c9 to your computer and use it in GitHub Desktop.
Reduce the size of Ubuntu Docker images
When you build from Ubuntu, apt-get update increases the size by about 600GB.
Instead, don't install the recommended updates, just what you need:
In your docker file:
RUN apt-get update && apt-get install --no-install-recommends --yes python3
Ref: https://ubuntu.com/blog/we-reduced-our-docker-images-by-60-with-no-install-recommends
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment