Anki running inside Docker.
It uses X11 client/server architecture to redirect the screen to a X Server. (for example, XMing on Windows. You can also bind it directly to a Linux socket on a Linux environment).
It uses a pulseaudio client to redirect the audio to a pulseaudio server. (on Windows environments, you can use the pulseaudio package available at https://www.freedesktop.org/wiki/Software/PulseAudio/Ports/Windows/Support/. Here's a useful guide to configure it)
docker run -d -e DISPLAY=192.168.99.1:0.0 -e PULSE_SERVER=192.168.99.1 txgio/anki:2.0.45
The Anki window should popup on your Windows screen and the audio should also play on your Windows machine.
docker run -d -e DISPLAY=192.168.99.1:0.0 -e PULSE_SERVER=192.168.99.1 -v $(pwd)/anki-data:/home/anki-user/Documents/Anki txgio/anki:2.0.45
Although the above method to map the data should work on a Linux machine, on a Windows environment it won't work properly, because SQLite doesn't quite work over a VirtualBox share.
So I also provide some utility images to import and/or export data between your local Windows machine and the Anki container. To do that just follow my instructions:
docker create --name anki-japanese -e DISPLAY=192.168.99.1:0.0 -e PULSE_SERVER=192.168.99.1 txgio/anki:2.0.45
docker run -it --rm -v $(pwd)/anki-data:/import --volumes-from anki-japanese txgio/anki:import
So now the container anki-japanese has all of the data and can run with your existing Anki profile(s). I suggest you to keep this anki-japanese container and start to review Anki only using it.
docker start anki-japanese
If you need to change the IPs of the X Server or Pulseaudio server, just use this container as a data container and create another one using the volumes from it (--volumes-from).
docker run -it --rm -v $(pwd)/anki-data:/export --volumes-from anki-japanese txgio/anki:export
You can't use docker stop to stop this container gracefully. Apparently Anki traps the SIGINT signal to stop gracefully. (You can see that in the file aqt/main.py on the Anki repository). So, to stop it gracefully you will need to issue (if you stop it by using docker stop your data might not be saved, so be aware):
docker kill --signal=SIGINT anki-japanese
TODO
Content type
Image
Digest
Size
338.7 MB
Last updated
almost 10 years ago
docker pull txgio/anki