Docker image for MapCache WMTS. Image is available at https://hub.docker.com/r/sogis/docker-mapcache. | Read-only mirror of https://github.com/sogis/docker-mapcache — Kanton Solothurn. Issues & pull requests at the source.
  • Go Template 49.4%
  • Shell 26.6%
  • Dockerfile 24%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-08-24 16:05:31 +02:00
.github/workflows Revoke permissions granted to the GITHUB_TOKEN 2026-07-16 10:49:38 +02:00
docs Switch to new MapCacheAlias 2022-11-29 11:21:07 +01:00
seed Update the seeding docs (#55) 2025-08-22 17:23:54 +02:00
.dockerignore Add .dockerignore file 2019-03-28 14:10:34 +01:00
.gitignore Update docs for running Vagrant from current dir 2022-06-03 17:43:50 +02:00
debian-backports.sources Install MapCache packages from trixie-backports 2026-07-16 10:49:38 +02:00
docker-compose.test.yml Don't show curl progress meter 2026-07-16 10:49:38 +02:00
Dockerfile Log to /dev/stdout instead of piping to cat command 2026-08-24 16:05:31 +02:00
entrypoint.sh Move setup of mapcache.xml config file to a separate shell script 2026-08-24 15:36:33 +02:00
LICENSE Initial commit 2018-05-13 18:26:01 +02:00
mapcache-default.xml.tpl Copy (and mount) mapcache.xml.tpl into a separate directory 2026-08-18 08:33:34 +02:00
mapcache.conf Switch to new MapCacheAlias 2022-11-29 11:21:07 +01:00
README.md Copy (and mount) mapcache.xml.tpl into a separate directory 2026-08-18 08:33:34 +02:00
setup-configfile.sh Move setup of mapcache.xml config file to a separate shell script 2026-08-24 15:36:33 +02:00
wmts-seeding-perimeter.gpkg doku und erster Wurf Image 2018-05-25 11:50:23 +02:00

docker-mapcache

Docker image providing a MapCache WMTS

Build

docker build -t local/mapcache .

Run

Prepare:

mkdir --mode=0777 /tmp/tiles

Run with default mapcache-default.xml.tpl config file template:

docker run --rm --name mapcache --mount type=bind,src=/tmp/tiles,dst=/tiles -p 8080:8080 -e DEMO_SERVICE_ENABLED=true local/mapcache

Provide your own mapcache.xml.tpl config file template:

docker run --rm --name mapcache --mount type=bind,src=/tmp/tiles,dst=/tiles --mount type=bind,src=~/my-mapcache.xml.tpl,dst=/mapcache/mapcache-configfile-template/mapcache.xml.tpl -p 8080:8080 -e DEMO_SERVICE_ENABLED=true local/mapcache

The following environment variables may be passed:

-e SERVICE_URL=https://geo-t.so.ch/api # The base URL of the MapCache service
-e SOURCE_URL=https://geo-t.so.ch/api/wms # The base URL of the source WMS
-e DEMO_SERVICE_ENABLED=true # Enable the MapCache demo service (a basic map viewer)
-e APACHE_ACCESS_LOG_ENABLED=true # Print Apache access log to standard output

Log into container:

bash -c "clear && docker exec -it mapcache /bin/bash"

WMTSCapabilities.xml:

http://localhost:8080/wmts/1.0.0/WMTSCapabilities.xml

Demo map (if enabled):

http://localhost:8080/demo

Troubleshooting:

If MapCache logs messages like sqlite backend failed to open db /tiles/xy.db: unable to open database file, then it maybe doesn't have write permission on the tiles host directory. In this case run the following command on the host machine:

sudo chmod g+w /tmp/tiles/

Seeding

Please refer to the instructions in the seed folder.