Skip to content

Commit

Permalink
Merge pull request #19 from camptocamp/pg_15_16
Browse files Browse the repository at this point in the history
Add PostgreSQL versions 15 and 16
  • Loading branch information
fredj authored Oct 1, 2024
2 parents 5da7f9e + 7f01fd3 commit 318579e
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 318579e

Please sign in to comment.