11
22# Define Default if Values not exist
3- BASE_IMAGE ?= rockylinux:9-minimal
3+ BASE_IMAGE ?= rockylinux:9.1 -minimal
44BASEOS ?= rocky9
55IMAGE_REPOSITORY ?= docker.io
6- IMAGE_PATH ?= cybertec-os -container
7- PG_MAJOR ?= 15
8- PG_VERSION ?= 15.0
6+ IMAGE_PATH ?= cybertec-pg -container
7+ PGVERSION ?= 15
8+ PGVERSION_FULL ?= 15.2
99OLD_PG_VERSIONS ?= 10 11 12 13 14
1010PATRONI_VERSION ?= 2.1.4
1111PGBACKREST_VERSION ?= 2.41
1212POSTGIS_VERSION ?= 3.2
1313PACKAGER ?= dnf
1414BUILD ?= 0
15- IMAGE_TAG ?= $(BASEOS ) -$(PG_VERSION ) -$(BUILD )
16- POSTGIS_IMAGE_TAG ?= $(BASEOS ) -$(PG_VERSION ) -$(POSTGIS_VERSION ) -$(BUILD )
15+ IMAGE_TAG ?= $(BASEOS ) -$(PGVERSION_FULL ) -$(BUILD )
16+ POSTGIS_IMAGE_TAG ?= $(BASEOS ) -$(PGVERSION_FULL ) -$(POSTGIS_VERSION ) -$(BUILD )
1717
1818# Settings for the Build-Process
1919BUILDWITH ?= docker
20- ROOTPATH = $(GOPATH ) /src/github.com/cybertec/cybertec-os -container
20+ ROOTPATH = $(GOPATH ) /src/github.com/cybertec/cybertec-pg -container
2121ifndef ROOTPATH
22- export ROOTPATH=$(GOPATH)/src/github.com/cybertec/cybertec-os -container
22+ export ROOTPATH=$(GOPATH)/src/github.com/cybertec/cybertec-pg -container
2323endif
2424
2525# Build Images
@@ -28,12 +28,13 @@ all: base pgbackrest postgres
2828base : base
2929pgbackrest : pgbackrest
3030postgres : base postgres
31- postgres-stage : postgres-stage
31+ postgres-stage : base postgres-stage
32+ exporter : exporter
3233
3334base-build :
3435 docker build $(ROOTPATH ) \
3536 --file $(ROOTPATH ) /docker/base/Dockerfile \
36- --tag cybertec-os -container/base:0.0.$(BUILD ) \
37+ --tag cybertec-pg -container/base:0.0.$(BUILD ) \
3738 --build-arg BASE_IMAGE \
3839 --build-arg IMAGE_REPOSITORY \
3940 --build-arg BASEOS \
@@ -44,22 +45,22 @@ base: base-build;
4445pgbackrest-build :
4546 docker build $(ROOTPATH ) \
4647 --file $(ROOTPATH ) /docker/pgbackrest/Dockerfile \
47- --tag cybertec-os -container/pgbackrest:0.0.$(BUILD ) \
48+ --tag cybertec-pg -container/pgbackrest:0.0.$(BUILD ) \
4849 --build-arg BASE_IMAGE \
4950 --build-arg IMAGE_REPOSITORY \
5051 --build-arg BASEOS \
5152 --build-arg PACKAGER \
5253 --build-arg CONTAINERSUITE \
5354 --build-arg BUILD \
5455 --build-arg PGBACKREST_VERSION \
55- --build-arg PG_MAJOR
56+ --build-arg PGVERSION
5657
5758pgbackrest : pgbackrest-build;
5859
5960postgres-build :
6061 docker build $(ROOTPATH ) \
6162 --file $(ROOTPATH ) /docker/postgres/Dockerfile \
62- --tag cybertec-os -container/postgres:$(PG_MAJOR ) .0. $(BUILD ) \
63+ --tag cybertec-pg -container/postgres:$(PGVERSION_FULL ) - $( BETA ) $(BUILD ) \
6364 --build-arg BASE_IMAGE \
6465 --build-arg IMAGE_REPOSITORY \
6566 --build-arg BASEOS \
@@ -68,16 +69,32 @@ postgres-build:
6869 --build-arg BUILD \
6970 --build-arg PATRONI_VERSION \
7071 --build-arg PGBACKREST_VERSION \
71- --build-arg PG_VERSION \
7272 --build-arg OLD_PG_VERSIONS \
73- --build-arg PG_MAJOR
73+ --build-arg PGVERSION
7474
7575postgres : postgres-build
7676
7777postgres-stage-build :
7878 docker build $(ROOTPATH ) \
79- --file $(ROOTPATH ) /docker/postgres_stage/Dockerfile \
80- --tag cybertec-os-container/postgres-stage:$(PG_MAJOR ) .0.$(BUILD ) \
79+ --file $(ROOTPATH ) /docker/postgres-stage/Dockerfile \
80+ --tag cybertec-pg-container/postgres-stage:$(PGVERSION_FULL ) -$(BETA )$(BUILD ) \
81+ --build-arg BASE_IMAGE \
82+ --build-arg IMAGE_REPOSITORY \
83+ --build-arg BASEOS \
84+ --build-arg PACKAGER \
85+ --build-arg CONTAINERSUITE \
86+ --build-arg BUILD \
87+ --build-arg PATRONI_VERSION \
88+ --build-arg PGBACKREST_VERSION \
89+ --build-arg OLD_PG_VERSIONS \
90+ --build-arg PGVERSION
91+
92+ postgres-stage : postgres-stage-build
93+
94+ exporter-build :
95+ docker build $(ROOTPATH ) \
96+ --file $(ROOTPATH ) /docker/exporter/Dockerfile \
97+ --tag cybertec-pg-container/exporter:0.1.$(BUILD ) \
8198 --build-arg BASE_IMAGE \
8299 --build-arg IMAGE_REPOSITORY \
83100 --build-arg BASEOS \
@@ -86,8 +103,7 @@ postgres-stage-build:
86103 --build-arg BUILD \
87104 --build-arg PATRONI_VERSION \
88105 --build-arg PGBACKREST_VERSION \
89- --build-arg PG_VERSION \
90106 --build-arg OLD_PG_VERSION \
91- --build-arg PG_MAJOR
107+ --build-arg PGVERSION
92108
93- postgres-stage : postgres-stage -build
109+ exporter : exporter -build
0 commit comments