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 prototypes and work-in-progress; the Docker images are fat (builder
: ~2GB, emulator
: ~3.8GB), 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, get the original Plato
repo:
$ cd plato-in-container
$ git submodule update --init
For building and getting the package ready for using on Kobo e-readers:
$ docker compose build plato-builder
$ docker compose run --rm plato-builder
or
$ docker compose build
$ docker compose run --rm plato-builder bash
in-container$ ./build.sh && ./dist.sh
For running the emulator and accessing the graphics device inside the container:
$ docker compose build plato-emulator
$ docker compose run --rm plato-emulator
Emulator 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 image
s for Plato. It appears the previous Dockerfile
s 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: