diff --git a/Dockerfile b/Dockerfile index d411671..3ffc190 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,8 @@ #--------- Generic stuff all our Dockerfiles should start with so we get caching ------------ +ARG DISTRO=debian ARG IMAGE_VERSION=buster ARG IMAGE_VARIANT=-slim -FROM debian:$IMAGE_VERSION$IMAGE_VARIANT +FROM $DISTRO:$IMAGE_VERSION$IMAGE_VARIANT MAINTAINER Tim Sutton # Reset ARG for version diff --git a/README.md b/README.md index a549217..73f310c 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,17 @@ Now edit ``71-apt-cacher-ng`` then do: docker build -t kartoza/postgis . ``` +### Building with alternative base distributions + +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) +``` +docker build --build-arg DISTRO=ubuntu --build-arg IMAGE_VERSION=focal --build-arg IMAGE_VARIANT="" -t kartoza/postgis . +``` + ## Run diff --git a/scenario_tests/datadir_init/test.sh b/scenario_tests/datadir_init/test.sh index d46f2c6..aac6bab 100755 --- a/scenario_tests/datadir_init/test.sh +++ b/scenario_tests/datadir_init/test.sh @@ -8,7 +8,7 @@ source ../test-env.sh # Run service docker-compose up -d -sleep 5 +sleep 30 services=("pg-default" "pg-new" "pg-recreate")