postgis / docker-postgis

Docker image for PostGIS
https://hub.docker.com/r/postgis/postgis/
MIT License
1.37k stars 462 forks source link

WIP: build-arg api v1 proposal #247

Open ImreSamu opened 3 years ago

ImreSamu commented 3 years ago

Experiment / Work in Progress

Creating customized PostGIS docker images via build arg ( debian based )

expected calling

git clone https://github.com/postgis/docker-postgis.git
cd docker-postgis
#optional:    ./update.sh

# customized local build ( for the 3rd party users )
docker build --pull \
  --build-arg PGIS_API_VERSION=v1 \
  \
  --build-arg PGIS_V1_BASE_IMAGE=postgres:13 \
  \
  --build-arg PGIS_V1_SFCGAL_CHECKOUT=tags/v1.3.10 \
  --build-arg PGIS_V1_PROJ_CHECKOUT=tags/8.1.0 \
  --build-arg PGIS_V1_GEOS_CHECKOUT=tags/3.8.2 \
  --build-arg PGIS_V1_GDAL_CHECKOUT=tags/v3.2.3 \
  --build-arg PGIS_V1_POSTGIS_CHECKOUT=main \
  \
  -t postgis:pg13-pgis-main \
  ./13-master/.

API v1 build-arg parameters

# Mandatory:
ARG PGIS_API_VERSION=v1

# Optional parameters - with defaults.
ARG PGIS_V1_BASE_IMAGE=postgres:13

ARG PGIS_V1_SFCGAL_REPOSITORY=https://gitlab.com/Oslandia/SFCGAL.git
ARG PGIS_V1_PROJ_REPOSITORY=https://github.com/OSGeo/PROJ.git
ARG PGIS_V1_GEOS_REPOSITORY=https://github.com/libgeos/geos.git
ARG PGIS_V1_GDAL_REPOSITORY=https://github.com/OSGeo/gdal.git
ARG PGIS_V1_POSTGIS_REPOSITORY=https://git.osgeo.org/gitea/postgis/postgis.git

ARG PGIS_V1_SFCGAL_CHECKOUT=
ARG PGIS_V1_PROJ_CHECKOUT=
ARG PGIS_V1_GEOS_CHECKOUT=
ARG PGIS_V1_GDAL_CHECKOUT=
ARG PGIS_V1_POSTGIS_CHECKOUT=

ARG PGIS_V1_BOOST_VERSION=
ARG PGIS_V1_CDAL_VERSION=

Open question:

ToDo :