Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: build-arg api v1 proposal #247

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ImreSamu
Copy link
Member

@ImreSamu ImreSamu commented Jul 4, 2021

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/.
  • Life cycle rule1: changes expected .. watch the repo!

  • Life cycle rule2: If the repository changes the API to "v2"

    • the PGIS_API_VERSION=v1 calling should FAIL.
    • the v2 args will be "PGIS_V2_<....>"
  • the PGIS_V1_<...>_CHECKOUT= can be any git checkout parameter:

    • <commit>
    • <branch>
    • <git tags>
  • You should check the PostGIS compatibility and support matrix

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:

  • renaming the 'Dockerfile.master.template' to Dockerfile.main.template ??

ToDo :

  • add an option for install from package vs. build ( now only the "build" supported )
  • testing
  • community discussions / implement feedback ... or drop the proposal
  • minimal documentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant