Sign inSign up

okieoth/osm2pgsql

By okieoth

Updated over 5 years ago

Image
0

92

okieoth/osm2pgsql repository overview

Docker-OSM2PGSQL-Container

This is a container to import OpenStreetMap-Data for a Mapnik-Tile-Server in a postgis-Database.

Installation

You need a postGIS-Container. For the importer you can use this Image from Docker-Hub cyper85/osm2pgsql.

# Create a Network to use the Postgis-Server in an other container
docker network create postgis-net

# Install a postgis-instance
docker run --detach --name test-postgis --network postgis-net cyper85/postgis

# Install a osm2pgsql-instance
docker run --env POSTGRES_HOST=test-postgis --name test-osm2pgsql --network postgis-net cyper85/osm2pgsql

Or you build your own image from source:

# Download sources
git clone https://github.com/cyper85/osm2pgsql.git
cd osm2pgsql/

# Build it
docker build --tag osm2pgsql .

# Install an instance
docker run --name test-osm2pgsql --network postgis-net osm2pgsql

Update Data

Simply restart the container:

docker start test-postgis 

Additional parameter

envdefault valuedescription
PBF_URLhttps://download.geofabrik.de/europe/germany/thueringen-latest.osm.pbfURL to PBF-File to import
IMPORT_FILEnot setIf this is set PBF_URL is ignored and the local file is used instead
POSTGRES_DBpostgresDatabase-Name
POSTGRES_USERpostgresDatabase-User
POSTGRES_PASSWORDDatabase-Password
POSTGRES_HOSTlocalhostDatabase-Hostname
POSTGRES_PORT5432Database-Port

Tag summary

Content type

Image

Digest

Size

227.6 MB

Last updated

over 5 years ago

docker pull okieoth/osm2pgsql:1.0.0