Emulator and builder Docker containers for Plato (a document reader for Kobo e-readers)
The Plato Docker images are designed as development containers, designed to minimize cargo build time during the container execution time, to compile and test Plato's code as fast as possible.
Currently, Docker images are somewhat optimized and work-in-progress; but the Docker images are fat (builder: ~1.8GB, emulator: ~2.5GB), docker build can take a long time and the containers probably run with more than necessary options.
Kobo devices require a specific arm-linux-gnueabihf-gcc version (Linaro GCC 4.9-2017.01) to compile the required Plato packages to be able to run Plato successfully on e-readers. (At least, I could not get Plato to work with Debian's stable repo's compiler version for the e-reader.) On the Plato emulator side; this time, emulator asks for a specific MuPDF version to be up and running.
Inspired by Jessie Frazelle's old blog post about Docker containers on the desktop, not wanting the dependency files to spread everywhere and trying to avoid dependency hell on the host machine, this repo tries to diminish the file situation with Docker containers.
Initially, clone this repo and then get the original Plato repo with:
$ cd plato-in-container
$ git submodule update --initFor building and getting the package ready for using on Kobo e-readers:
$ docker compose run --rm plato-builderor
$ docker compose run --rm plato-builder bash
# ./build.sh && ./dist.shFor running the emulator and accessing the graphics device inside the container:
$ docker compose run --rm plato-emulator bash
# ./run-emulator.shor
$ docker compose run --rm plato-emulatorEmulator running inside Docker container and using local machine's display:
| Home Screen | Reader Screen |
|---|---|
![]() |
![]() |
The reason Plato in Container is a separate repository and not a part of the original Plato repo is that these are not the first attempt at creating docker images for Plato. It appears the previous Dockerfiles were removed from Plato's repo because of a lack of maintenance and it seems that Plato's maintainer was not using them. On the under hand, emulator image required MuPDF libraries to be installed on the host.
I don't want to burden the maintainer with a similar PR without a track record. The separate repo also opens up an opportunity to experiment with Docker using git subtrees, git submodules and symbolic links to the locally cloned repo directories.
For reference, the previous Dockerfiles' history:

