diff --git a/Dockerfile b/Dockerfile index f7c0754..eefa6eb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,6 @@ ARG BASE_TAG -FROM postgres:${BASE_TAG}-bullseye AS builder +ARG DEBIAN_RELEASE +FROM postgres:${BASE_TAG}-${DEBIAN_RELEASE} AS builder RUN apt-get update && \ apt-get install -y unzip build-essential git wget libbrotli-dev @@ -33,7 +34,8 @@ RUN ./main/pg/wal-g --version && \ cp ./main/pg/wal-g /wal-g-v2.0.1 ARG BASE_TAG -FROM postgres:${BASE_TAG}-bullseye +ARG DEBIAN_RELEASE +FROM postgres:${BASE_TAG}-${DEBIAN_RELEASE} ARG POSTGIS_VERSIONS ENV DEBIAN_FRONTEND=noninteractive \ diff --git a/Makefile b/Makefile index 1f10e38..825671b 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,8 @@ PGHOST := $(shell ip -json addr|jq -r '.[] | select(.ifname | test("^docker0$$") define build-image @echo Base tag $1 @echo Postgis versions $2 - docker build --pull --no-cache --build-arg BASE_TAG=${1} --build-arg POSTGIS_VERSIONS=${2} -t camptocamp/postgres:${1}-postgis-$(subst $(space),-,${2}) . + @echo Debian release $3 + docker build --pull --no-cache --build-arg BASE_TAG=${1} --build-arg POSTGIS_VERSIONS=${2} --build-arg DEBIAN_RELEASE=${3} -t camptocamp/postgres:${1}-postgis-$(subst $(space),-,${2}) . docker stop db || true docker run --rm --name=db --detach --publish=5432:5432 --env=POSTGRES_USER=www-data --env=POSTGRES_PASSWORD=www-data --env=POSTGRES_DB=test camptocamp/postgres:${1}-postgis-$(subst $(space),-,${2}) sleep 10 @@ -19,19 +20,25 @@ define build-image docker system prune --all -f endef -all: 10 11 12 13 14 +all: 10 11 12 13 14 15 16 10: - $(call build-image,"10","3") + $(call build-image,"10","3","bullseye") 11: - $(call build-image,"11","3") + $(call build-image,"11","3","bookworm") 12: - $(call build-image,"12","3") + $(call build-image,"12","3","bookworm") 13: - $(call build-image,"13","3") + $(call build-image,"13","3","bookworm") 14: - $(call build-image,"14","3") + $(call build-image,"14","3","bookworm") + +15: + $(call build-image,"15","3","bookworm") + +16: + $(call build-image,"16","3","bookworm")