Skip to content

Latest commit

 

History

History
88 lines (56 loc) · 2.37 KB

File metadata and controls

88 lines (56 loc) · 2.37 KB

Scenario Tests deploy-image

Table of Contents

docker-postgis

Building the image

The following convention is used for tagging the images:

kartoza/postgis:[POSTGRES_MAJOR_VERSION]-[POSTGIS_MAJOR_VERSION].[POSTGIS_MINOR_RELEASE]

So for example:

kartoza/postgis:18-3.6 Provides PostgreSQL 18.0, PostGIS 3.6

Self build using Repository checkout

To build the image yourself do:

docker build -t kartoza/postgis git://github.com/kartoza/docker-postgis

Alternatively clone the repository and build against any preferred branch

git clone git://github.com/kartoza/docker-postgis
git checkout branch_name

Then do:

docker build -t kartoza/postgis .

Or build against a specific PostgreSQL version

docker build --build-arg POSTGRES_MAJOR_VERSION=13 --build-arg POSTGIS_MAJOR=3 -t kartoza/postgis:POSTGRES_MAJOR_VERSION .

Alternative base distributions builds

There are build args for DISTRO (=debian), IMAGE_VERSION (=buster) and IMAGE_VARIANT (=slim) which can be used to control the base image used (but it still needs to be Debian based and have PostgreSQL official apt repo).

For example making Ubuntu 20.04 based build (for better arm64 support) Edit the .env file to change the build arguments,

DISTRO=ubuntu 
IMAGE_VERSION=focal 
IMAGE_VARIANT="" 

Then run the script

./build.sh

Locales

By default, the image build will include all locales to cover any value for locale settings such as

  • DEFAULT_COLLATION
  • DEFAULT_CTYPE
  • DEFAULT_ENCODING

You can use the build argument: GENERATE_ALL_LOCALE=0

This will build with the default locate and speed up the build considerably.