1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Update contrib/mkimage/debootstrap to remove /var/lib/apt/lists (trimming at least 40MB and forcing "apt-get update" in dependent images before packages can be installed)

Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
This commit is contained in:
Tianon Gravi 2014-06-25 19:07:39 -06:00
parent 917b7436af
commit c42b5575e5

View file

@ -164,9 +164,13 @@ if [ -z "$DONT_TOUCH_SOURCES_LIST" ]; then
esac
fi
# make sure we're fully up-to-date, too
(
set -x
chroot "$rootfsDir" apt-get update
chroot "$rootfsDir" apt-get dist-upgrade -y
# make sure we're fully up-to-date
chroot "$rootfsDir" bash -c 'apt-get update && apt-get dist-upgrade -y'
# delete all the apt list files since they're big and get stale quickly
rm -rf "$rootfsDir/var/lib/apt/lists"/*
# this forces "apt-get update" in dependent images, which is also good
)