mirror of
https://github.com/sogis/docker-mapcache.git
synced 2026-08-26 00:24:16 +00:00
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%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| .github/workflows | ||
| docs | ||
| seed | ||
| .dockerignore | ||
| .gitignore | ||
| debian-backports.sources | ||
| docker-compose.test.yml | ||
| Dockerfile | ||
| entrypoint.sh | ||
| LICENSE | ||
| mapcache-default.xml.tpl | ||
| mapcache.conf | ||
| README.md | ||
| setup-configfile.sh | ||
| wmts-seeding-perimeter.gpkg | ||
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.