justb4 / docker-mapfish-print2

Docker Image for CampToCamp.com's MapFish Print (Servlet) version 2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

docker-mapfish-print2

Docker image and tools for MapFish Print (MFP) VERSION 2 legacy.

This version is still used in quite some contexts.

If you read this on DockerHub, local links will not work, read full README here.

Log4J Security fix

Read more here. Bottom line: this project does not use Log4J2 (but v1)!

Building

With the script build.sh the Docker image can be build from the 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.

Build Options

The files under the config dir are automatically integrated in the Docker image as follows:

You can adapt these or use a prebuilt Docker Image and use Volume mapping or extend the image.

Running

See the examples directory for how to run with your own config. The main things to do are:

Example:

    <!-- Example how to configure for your YAML config(s) -->
    <servlet>
        <servlet-name>mapfish.print.default</servlet-name>
        <servlet-class>org.mapfish.print.servlet.MapPrinterServlet</servlet-class>
        <init-param>
            <param-name>config</param-name>
            <param-value>config/config.default.yaml</param-value>
        </init-param>
    </servlet>
    <servlet-mapping>
        <servlet-name>mapfish.print.default</servlet-name>
        <url-pattern>/pdf.default/*</url-pattern>
    </servlet-mapping>

  • mount these files into the container using Docker Volume mount (or extend the Docker build)
  • optional: provide HTML test-pages, see examples

Credits

About

Docker Image for CampToCamp.com's MapFish Print (Servlet) version 2

License:GNU General Public License v3.0


Languages

Language:Dockerfile 50.5%Language:HTML 42.6%Language:Shell 6.9%