mirror of
https://github.com/kiwix/kiwix-tools.git
synced 2025-08-03 11:25:59 -04:00
1.5 KiB
1.5 KiB
Kiwix serve Docker image
With local ZIM file(s)
-
Download a ZIM file from https://wiki.kiwix.org/wiki/Content
-
Given
wikipedia.zim
andwiktionary.zim
reside in/tmp/zim/
, execute the following:
docker run -v /tmp/zim:/data -p 8080:8080 ghcr.io/kiwix/kiwix-serve wikipedia.zim wiktionary.zim
or, if you want to load all ZIM files within a directory, then use globbing:
docker run -v /tmp/zim:/data -p 8080:8080 ghcr.io/kiwix/kiwix-serve '*.zim'
With remote ZIM file
docker run -e "DOWNLOAD=https://download.kiwix.org/zim/wikipedia_bm_all.zim" -p 8080:8080 ghcr.io/kiwix/kiwix-serve
Change default port
You can change port to expose with environment variable PORT, useful if running on Podman, K8s or OpenShift
podman run -e "DOWNLOAD=https://download.kiwix.org/zim/wikipedia_bm_all.zim" -e PORT=8888 -p 8080:8888 ghcr.io/kiwix/kiwix-serve
ARM
Build an image for an ARM based GNU/Linux:
docker build . -t ghcr.io/kiwix/kiwix-serve:latest --build-arg ARCH="arm32v7/"
Docker Compose
You can also deploy kiwix with
docker-compose
. Check out a
sample at docker-compose.yml.example.