kopia lustrzana https://github.com/kartoza/docker-postgis
Allow changing of distro at build time (#233)
* Allow changing of distro at build time Ubuntu focal has better arm64 support for example. * Document build-arg usage * increase sleep time as per https://github.com/kartoza/docker-postgis/pull/233#discussion_r409846863pull/234/head^2
rodzic
8b12300b2b
commit
b1308e3215
|
@ -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<tim@kartoza.com>
|
||||
|
||||
# Reset ARG for version
|
||||
|
|
11
README.md
11
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
|
||||
|
||||
|
||||
|
|
|
@ -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")
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue