Skip to content

Commit

Permalink
feat: build version 15 and 16, use debian bookworm for versions 11 to 16
Browse files Browse the repository at this point in the history
  • Loading branch information
fredj authored and Vampouille committed Aug 27, 2024
1 parent 5da7f9e commit 7f01fd3
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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 \
Expand Down
21 changes: 14 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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")

0 comments on commit 7f01fd3

Please sign in to comment.