Docker container with the toolchain to create mapsforge maps with osmosis, mapsforge-map-writer plugin and phyghtmap. The container can be used stand-alone or as a SSH based Jenkins slave.
Osmosis is a command line Java application for processing OSM data. The tool consists of pluggable components that can be chained to perform a larger operation. For example, it has components for reading/writing databases and files, deriving/applying changes to data sources, and sorting data.
How to use this image stand-alone
The following docker command runs the image, maps the user's home directory into /opt/osmosis and opens an interactive shell.
$ docker run --rm -i -t -v ~:/opt/osmosis henkel/jenkins-slave-osmosis:latest bash
Now osmosis is ready to process OpenStreetMap data in directory /opt/osmosis.
$ osmosis --rbf /opt/osmosis/germany-latest.osm.pbf --tee 1 --bounding-box left=8.30 bottom=48.86 right=8.59 top=49.03 --wx /opt/osmosis/karlsruhe.osm
How to use this image with Jenkins
Jenkins is able to automatically pull the image and launch the build slave using its Cloud feature.
Add a new Docker Template to Jenkins' Docker Cloud:
- Docker Image: henkel/jenkins-slave-osmosis:latest
- Volumes: your local path:/opt/osmosis
- Labels: osmosis
- Usage: Only build jobs with label restrictions matching this node
- Launch Method: Docker SSH computer launcher
- Credentials: jenkins/jenkins
Jenkins executes build scripts via a non-interactive SSH shell. You might want to load the environment explicitly at the beginning of your script so that the path to osmosis is properly configured.
#!/bin/bash . /etc/profile
Copyright (C) 2015-2017 Philipp Henkel
Licensed under the MIT License (MIT). See LICENSE file for more details.