Allow disabling apt-get clean
Sometimes users want to maintain the apt cache in their images. Change-Id: Id49a04896cf3eeaf1557f1d644e4d8ba64716392
This commit is contained in:
parent
d3324cbb69
commit
d2f4c3b843
@ -10,7 +10,8 @@ can be used by any dpkg based element.
|
|||||||
|
|
||||||
The dpkg specific version of install-packages is also kept here.
|
The dpkg specific version of install-packages is also kept here.
|
||||||
|
|
||||||
### Environment Variables ###
|
Environment Variables
|
||||||
|
---------------------
|
||||||
|
|
||||||
* DIB\_ADD\_APT\_KEYS: If an extra or updated apt key is needed then define
|
* DIB\_ADD\_APT\_KEYS: If an extra or updated apt key is needed then define
|
||||||
DIB\_ADD\_APT\_KEYS with the path to a folder. Any key files inside will be
|
DIB\_ADD\_APT\_KEYS with the path to a folder. Any key files inside will be
|
||||||
@ -20,3 +21,6 @@ The dpkg specific version of install-packages is also kept here.
|
|||||||
mount the $DIB_IMAGE_CACHE/apt/$DISTRO_NAME directory in
|
mount the $DIB_IMAGE_CACHE/apt/$DISTRO_NAME directory in
|
||||||
/var/cache/apt/archives, this to cache the .deb files downloaded during the image
|
/var/cache/apt/archives, this to cache the .deb files downloaded during the image
|
||||||
creation.
|
creation.
|
||||||
|
* At the end of a dib run we clean the apt cache to keep the image size as
|
||||||
|
small as possible. You can set DIB\_DISABLE\_APT\_CLEANUP=1 if you would
|
||||||
|
like to prevent this.
|
||||||
|
@ -7,4 +7,6 @@ fi
|
|||||||
set -eu
|
set -eu
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
apt-get clean
|
if [ "${DIB_DISABLE_APT_CLEANUP:-0}" != "1" ]; then
|
||||||
|
apt-get clean
|
||||||
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user