All Projects → pgRouting → Docker Pgrouting

pgRouting / Docker Pgrouting

Licence: gpl-2.0
Docker for pgRouting

docker-pgrouting

Docker automated Docker status Docker builds

pgRouting Docker images.

Contents

Versions

There are several versions available:

(*) If you want to use the last versions of develop or master branches you should consider to build the image by your own. See here how to build images:

Tag roles

{PostgreSQL major}-{PostGIS major}-{pgRouting version}

Tag for pgRouting 2.6.3 with PostgreSQL 12 and PostGIS 3.0:

pgrouting/pgrouting:12-3.0-2.6.3

How to use

Running pgRouting with Docker compose

Run postgres database:

$ cd 12-3.0-2.6.3
$ docker-compose up

Running pgRouting without Docker compose

Run postgres database:

$ docker run --name pgrouting -p 5432:5432 pgrouting/pgrouting:12-3.0-2.6.3

How to build images

Building images:

$ docker build -t pgrouting/pgrouting:13-3.0-master .

Using psql with Docker compose:

Example:

$ docker-compose exec postgis psql -h localhost -U postgres
psql (12.3 (Debian 12.3-1.pgdg100+1))
Type "help" for help.

postgres=#

[email protected] ~>create database test;
CREATE DATABASE

[email protected] ~>\c test
You are now connected to database "test" as user "postgres".
[email protected] test>create extension postgis;                                          
CREATE EXTENSION

[email protected] test>create extension pgrouting ;
CREATE EXTENSION

[email protected] test>select version();
                                               version                                                
------------------------------------------------------------------------------------------------------
 PostgreSQL 12.3 (Debian 12.3-1.pgdg100+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 8.3.0-6) 8.3.0, 64-bit
(1 row)

[email protected] test>select pgr_version();
                pgr_version                
-------------------------------------------
3.1.0
(1 row)

[email protected] test>select postgis_full_version();
                        postgis_full_version                                                                      
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------
POSTGIS="3.0.1 ec2a9aa" [EXTENSION] PGSQL="120" GEOS="3.7.1-CAPI-1.11.1 27a5e771" PROJ="Rel. 5.2.0, September 15th, 2018" LIBXML="2.9.4" LIBJSON="0.12.1" LIBPROTOBUF="1.3.1" WAGYU="0.4.3 (Internal)"
(1 row)

Develop

To make new version for example x.x.x, run following:

mkdir 12-3.0-x.x.x
touch 12-3.0-x.x.x/Dockerfile
make update

make update run update.sh, that finds new Dockerfile and generates Dockerfile, docker-compose.yml, README.md, and extra/Dockerfile from template.

License

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

Links

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].