Created
May 18, 2015 15:29
-
-
Save marvell/7c812736565928e602c4 to your computer and use it in GitHub Desktop.
Remove APT cache (for Dockerfile)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apt-get clean autoclean | |
| apt-get autoremove --yes | |
| rm -rf /var/lib/{apt,dpkg,cache,log}/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Well yes, these commands should be the last
RUNditective given in the Dockerfile in order to reduce the size of it.If you need to use apt from within the container later for any reason you can try
rm -rf /var/lib/{apt,dpkg,cache,log}/*instead. This will keep the folders but remove their contents.