Sign inSign up

ingmapping/postgis-osm

By ingmapping

•Updated over 8 years ago

PostGIS in docker for importing OpenStreetMap data

Image
0

629

ingmapping/postgis-osm repository overview

⁠docker-postgis-osm

PostGIS in docker for importing OpenStreetMap data. This postgis docker container is based on the official postgres docker image⁠ version 9.3. It creates a template database 'gis' owned by user 'postgres' and installs the extensions of postgis and hstore. It is intented to be used with docker-osm2pgsql⁠.

⁠docker-postgis-osm set up

Can be built from the Dockerfile:

    docker build -t ingmapping/postgis-osm github.com/ingmapping/docker-postgis-osm.git

or pulled from Docker Hub:

docker pull ingmapping/postgis-osm

⁠docker-postgis-osm run

To run docker-postgis-osm, launch the container:

# docker run -d --name postgis-osm ingmapping/postgis-osm

By default, a database gis will be created with postgres user/owner postgres. These can be changed with environment variables in the RUN command:

# docker run -d --name postgis-osm -e "POSTGRES_USER=ingmapping" -e "POSTGRES_DB=osm_custom_database" ingmapping/postgis-osm

These variables can be accessed from linked containers. Consider the link alias pg:

PG_ENV_POSTGRES_USER=postgres
PG_ENV_POSTGRES_DB=gis

These can then be passed into import scripts or clients in other containers.

Tag summary

Content type

Image

Digest

Size

151.2 MB

Last updated

over 8 years ago

docker pull ingmapping/postgis-osm