prepare.sh (886B)
1 #!/usr/bin/env bash 2 set -e 3 set -x 4 5 # # use snapshot repos for deterministic package versions 6 # DATE="20230220T144122Z" 7 # cat << EOF > /etc/apt/sources.list 8 # deb http://snapshot.debian.org/archive/debian/${DATE}/ bookworm main 9 # deb http://snapshot.debian.org/archive/debian-security/${DATE}/ bookworm-security main 10 # EOF 11 12 # # ignore expired package releases (they expire too fast) 13 echo 'Acquire::Check-Valid-Until "0";' >> /etc/apt/apt.conf.d/10-ignore-expiry 14 15 # # do not install documentation to keep image small 16 echo "path-exclude=/usr/share/locale/*" >> /etc/dpkg/dpkg.cfg.d/01_nodoc 17 echo "path-exclude=/usr/share/man/*" >> /etc/dpkg/dpkg.cfg.d/01_nodoc 18 echo "path-exclude=/usr/share/doc/*" >> /etc/dpkg/dpkg.cfg.d/01_nodoc 19 20 # # update package sources 21 apt-get update 22 apt-get -y upgrade 23 24 # install of default-jdk-headless fails otherwise on *-slim image 25 mkdir -p /usr/share/man/man1