Sign inSign up

cyper85/osm2pgsql

By cyper85

Updated over 5 years ago

Import-Container für OpenStreetmap-Tile-Server

Image
0

1.2K

cyper85/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 postgis/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
POSTGRES_DBpostgresDatabase-Name
POSTGRES_USERpostgresDatabase-User
POSTGRES_PASSWORDDatabase-Password
POSTGRES_HOSTlocalhostDatabase-Hostname
POSTGRES_PORT5432Database-Port

Tag summary

Content type

Image

Digest

Size

242.6 MB

Last updated

over 5 years ago

docker pull cyper85/osm2pgsql