Skip to content

Create a Docker image similar to the build VM

Pierre Rudloff requested to merge Rudloff/fdroidserver:docker into master

This is an attempt at creating a Docker image containing the same tools as the build VM (see #119 (closed)).

My main use case is that it is faster than the Virtualbox VM.

It can be used like this:

docker run -v /path/to/fdroiddata/:/home/vagrant/fdroiddata <image-id> build

The image is ~60 GB. I guess it could be improved by removing the cache directory at the end of the build and building it with docker build --squash, but it is probably too big to host it in a repository anyway.

In order to make it work, I had to make a few changes to the code:

  • Add a way to tell fdroid to use a different config file (or it would use the config file from the mounted fdroiddata, which would probably not work).
  • Add a new makebuildserver option that allows to only download the cache but not try to build the box.

Currently, it uses the version of fdroidserver contained in the image, but I guess we could make fdroid upload itself to the container like we do for the VM.

PS: @eighthave mentioned that we could use Vagrant to orchestrate the Docker image. This seems possible but I have no experience using Vagrant to create Docker images. And from what I understand of the Vagrant documentation, it seems it would not abstract that much, since it would still need a Dockerfile to do the provisioning.

Merge request reports