1
0

feat: add debian 12 bookworm image

This commit is contained in:
dump_stack() 2023-05-24 10:28:23 +00:00
parent c1fceb6ce6
commit 93f66b08f4
Signed by: dump_stack
GPG Key ID: BE44DA8C062D87DC
2 changed files with 14 additions and 4 deletions

View File

@ -1,4 +1,4 @@
FROM debian:_VERSION_
FROM debian:_RELEASE_
ENV DEBIAN_FRONTEND=noninteractive

View File

@ -4,7 +4,7 @@ set -eux
cd $(dirname $(realpath $0))
for version in 7 8 9 10 11; do
for version in 7 8 9 10 11 12; do
if [[ $version -eq 7 ]]; then
release=wheezy
last_version=7.11.0
@ -25,17 +25,27 @@ for version in 7 8 9 10 11; do
release=bullseye
last_version=11.6.0
fi
if [[ $version -eq 12 ]]; then
release=bookworm
last_version=12.0.0
fi
mkdir $version
sed "s/_VERSION_/${version}/" Dockerfile.template >> $version/Dockerfile
sed -i "s/_RELEASE_/${release}/" $version/Dockerfile
if [[ $version -eq 11 ]]; then
if [[ $version -eq 11 || $version -eq 12 ]]; then
sed -i "s/,policykit-1//" $version/Dockerfile
fi
repository=$(wget -q -O - https://cdimage.debian.org/mirror/cdimage/archive/${last_version}/amd64/jigdo-bd/debian-${last_version}-amd64-BD-1.jigdo | gunzip | awk -F= '/snapshot.debian.org/ {print $2}' | cut -d ' ' -f 1)
# TODO: grep -Po 'http://snapshot[^ ]*' /etc/apt/sources.list | head -n1
if [[ $version -eq 12 ]]; then
repository=http://deb.debian.org/debian
else
repository=$(wget -q -O - https://cdimage.debian.org/mirror/cdimage/archive/${last_version}/amd64/jigdo-bd/debian-${last_version}-amd64-BD-1.jigdo | gunzip | awk -F= '/snapshot.debian.org/ {print $2}' | cut -d ' ' -f 1)
fi
sed -i "s;_REPOSITORY_;${repository};" $version/Dockerfile