wiki:DevWikiDockerTesting

Version 19 (modified by robe, 22 months ago) ( diff )

--

The PostGIS project uses docker for a number of regression tests and production use. We have two different docker setups.

On OSGeo infrastructure we have docker.osgeo.org which docker images are pushed to via postgis-docker.osgeo.org. These are currently only used by dronie.osgeo.org and woodie.osgeo.org drone agents. They ware useful for general development as well, because they include multiple versions of PostgreSQL and also include pre-installed postgis versions for doing upgrade tests.

Docker OSGeo

The docker osgeo infrastructure you can log in via your osgeo user id. Only PostGIS development team members have push rights to this repo. More details of the images, dockerfiles in use by it can be found at PostGIS-docker repo.

Here is an example of how you can pull an image, retag and push to postgis-docker.osgeo.org

#To develop and test using this image, do the following
mkdir projects

#this container has no built in entry point to keep it running, 
# create a fake one as discussed here - https://levelup.gitconnected.com/keep-docker-container-running-for-debugging-fc2dfa39472c

#this might take a minute or so after download to start up
docker run -d \
  --name postgis-dev \
  --mount type=bind,source="$(pwd)/projects",target=/projects \
  docker.osgeo.org/postgis/build-test:trisquel3  tail -f /dev/null

cd projects
git clone https://git.osgeo.org/gitea/postgis/postgis.git



#once started you can attach to it
docker exec -it postgis-dev /bin/bash

# in the postgis-dev container, you should be able to do
cd /projects/postgis
export PGVER=15
service postgresql start ${PGVER}
export PGPORT=`grep ^port /etc/postgresql/$PGVER/main/postgresql.conf | awk '{print $3}'`
export PATH=/usr/lib/postgresql/$PGVER/bin:$PATH

sh autogen.sh
./configure
make
make check

make install
#any changes you make to your local folder projects/postgis, will show in the container /projects/postgis

#in the container

# To stop it do
docker stop postgis-dev

# if you need to remove the container to get a new version do

docker rm postgis-dev

Docker Hub PostGIS

Docker Hub is used for Github-actions testing and there is also a postgis for production use. The main link to all is https://hub.docker.com/u/postgis

Note: See TracWiki for help on using the wiki.