Merge pull request #6690 from tianon/remove-apt-lists
Update contrib/mkimage/debootstrap to remove /var/lib/apt/lists Upstream-commit: 9aa840c50dde3d61e620bc8d43861ed0101ac990 Component: engine
This commit is contained in:
@ -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
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user