kiwix / kiwix-tools

Command line Kiwix tools: kiwix-serve, kiwix-manage, ...
https://download.kiwix.org/release/kiwix-tools/
GNU General Public License v3.0
428 stars 83 forks source link

Kiwix-serve Docker container can't open .zim file. #570

Closed grenius closed 2 years ago

grenius commented 2 years ago

My environment: raspberry Pi4 4gb/ Raspberry Pi OS Bullseye 64bit

I have the .zim file on a SSD if that's a variable worth considering.

My initial run command:

docker run -d --name kiwix -v /mnt/ssd/kiwix/:/data -p 8282:80 kiwix/kiwix-serve *.zim

Log upon container creation:

docker logs --tail 30 -f kiwix [?2004l /usr/local/bin/kiwix-serve --port=80 wikipedia_en_all_maxi_2022-05.zim Unable to add the ZIM file 'wikipedia_en_all_maxi_2022-05.zim' to the internal library. Here is the content of /data: /data/wikipedia_en_all_maxi_2022-05.zim

I tried a fix by @kelson42 (thanks again)

docker run -d --name kiwix -v /mnt/ssd/kiwix/:/data -p 8282:80 kiwix/kiwix-serve '*.zim' `

But the container just seems to hang with a >

Edit: after letting it run for a while this was the output:

$ docker run -d --name kiwix -v /mnt/ssd/kiwix/:/data -p 8282:80 kiwix/kiwix-serve '*.zim'`

-bash: unexpected EOF while looking for matching ``' -bash: syntax error: unexpected end of file

Any help is appreciated.

kelson42 commented 2 years ago

@grenius You have problems with backticks. You should at least not have one at the end.

grenius commented 2 years ago

@kelson42 yeah it was copied directly from your post. I removed the back tick and still no good.

kelson42 commented 2 years ago

What do you type now and what do you get exactly?

grenius commented 2 years ago

@kelson42 it works. Thank you for your help. Not sure what was different, though I did move the zim off the SSD and on to internal memory. Not sure if that changed anything. Thanks again.