https://github.com/justb4/docker-mapfish-print2
Docker Image for CampToCamp.com's MapFish Print (Servlet) version 2
https://github.com/justb4/docker-mapfish-print2
docker docker-image mapfish ogc-services osgeo
Last synced: 2 months ago
JSON representation
Docker Image for CampToCamp.com's MapFish Print (Servlet) version 2
- Host: GitHub
- URL: https://github.com/justb4/docker-mapfish-print2
- Owner: justb4
- License: gpl-3.0
- Created: 2019-11-11T15:48:24.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-12-15T12:09:16.000Z (over 4 years ago)
- Last Synced: 2025-03-26T17:22:00.746Z (over 1 year ago)
- Topics: docker, docker-image, mapfish, ogc-services, osgeo
- Language: Dockerfile
- Size: 432 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# docker-mapfish-print2
Docker image and tools for MapFish Print (MFP) **VERSION 2** legacy.
This version is still used in quite some contexts.
* Find the [MapFish Print v2 docs here](http://www.mapfish.org/doc/print/).
* Find [Docker Images on DockerHub](https://hub.docker.com/r/justb4/mapfish-print2).
* See my repo [docker-mapfish-print](https://github.com/justb4/docker-mapfish-print) for a MFP **version 3+** Docker Image.
If you read this on DockerHub, local links will not work, [read full README here](https://github.com/justb4/docker-mapfish-print2).
## Log4J Security fix
Read more [here](config/webapp/WEB-INF/lib/README.md). Bottom line: this project does **not** use Log4J2 (but v1)!
## Building
With the script [build.sh](build.sh) the Docker image can be build
from the [Dockerfile](Dockerfile) but this is not really necessary as
you may use your own `docker build` commandline.
Build arguments with values if not passed to build:
- **IMAGE_TIMEZONE** - timezone of Docker image, default ``"Europe/Amsterdam"``
- **IMAGE_LOCALE** - locale of Docker image, default ``"nl_NL.UTF-8"``
- **MFPRINT_VERSION** - MapFish Print (Servlet) version, default ``"2.1-SNAPSHOT"``
## Versions
I found that `2.1-SNAPSHOT` was the highest MFP2 version that worked (for me).
These come from https://oss.sonatype.org/content/repositories/snapshots/org/mapfish/print/print-servlet/.
If you are able to get a higher version working, let me know, via [the issue-tracker](https://github.com/justb4/docker-mapfish-print2/issues).
### Build Options
The files under the [config](config) dir are automatically integrated in the Docker image as follows:
- [config/tomcat/*](config/tomcat): override any files in the standard Tomcat install (see below)
- [config/tomcat/bin/setenv.sh](config/tomcat/bin/setenv.sh): Tomcat options like for memory, proxies etc
- [config/tomcat/conf/server.xml](config/tomcat/bin/setenv.sh): server settings like port (default 8080) and threads
- [config/webapp/WEB-INF/web.xml](config/webapp/WEB-INF/web.xml): override web.xml for Tomcat MFP .war
- [config/webapp/config/index.html](config/webapp/config/index.html): the demo page, provide your own if required
You can adapt these or use a [prebuilt Docker Image](https://hub.docker.com/r/justb4/mapfish-print2)
and use Volume mapping or extend the image.
## Running
See the [examples directory](examples) for how to run with your own config.
The main things to do are:
* create Print config YAML file(s) see [examples](examples/webapp/config) and the [MFP v2 docs](http://www.mapfish.org/doc/print/)
* configure each config YAML within `web.xml` at bottom, use [config/webapp/WEB-INF/web.xml](config/webapp/WEB-INF/web.xml) as starter
Example:
```
mapfish.print.default
org.mapfish.print.servlet.MapPrinterServlet
config
config/config.default.yaml
mapfish.print.default
/pdf.default/*
```
* mount these files into the container using Docker Volume mount (or extend the Docker build)
* optional: provide HTML test-pages, see [examples](examples/webapp/config/test)
## Credits
* Kartoza team: https://github.com/kartoza for providing good examples of Dockerfiles for FOSS geospatial Java .war's.
* TT Fonts addition: https://github.com/panosoft/docker-prince-server/blob/master/Dockerfile
* [CampToCamp](https://www.camptocamp.com/) for developing MapFish Print and many other useful FOSS Geospatial software