This is a container to import OpenStreetMap-Data for a Mapnik-Tile-Server in a postgis-Database.
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
Simply restart the container:
docker start test-postgis
| env | default value | description |
|---|---|---|
| PBF_URL | https://download.geofabrik.de/europe/germany/thueringen-latest.osm.pbf | URL to PBF-File to import |
| IMPORT_FILE | not set | If this is set PBF_URL is ignored and the local file is used instead |
| POSTGRES_DB | postgres | Database-Name |
| POSTGRES_USER | postgres | Database-User |
| POSTGRES_PASSWORD | Database-Password | |
| POSTGRES_HOST | localhost | Database-Hostname |
| POSTGRES_PORT | 5432 | Database-Port |
Content type
Image
Digest
Size
227.6 MB
Last updated
over 5 years ago
docker pull okieoth/osm2pgsql:1.0.0