Docker image for kiwix-serve
from kiwix-tools.
Please read kiwix-tools
' license terms before using this Dockerfile.
In order to build the image, you have to clone the repository.
git clone https://github.com/sfischer13/docker-kiwix
cd docker-kiwix
Then, build the Docker image.
make build VERSION=2.1.0
Before you can use the server, you have to build the image as described above.
ZIM files on the host must be made accessible by using Docker bind mounts.
This command will start a server on port 8090
.
It will provide all ZIM files found in ~/.kiwix/zim
.
PORT=8090
ZIM=~/.kiwix/zim
docker run -d -i --rm \
--mount type=bind,source="$ZIM",target=/local/data,readonly \
--publish 127.0.0.1:$PORT:8080/tcp \
--name kiwix \
sfischer13/kiwix:2.1.0
Stop the daemon again:
docker stop kiwix
Open a shell within the container:
docker run --rm -i -t sfischer13/kiwix:2.1.0 bash