You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Adrian Malacoda cfb7f243dc revert debugging, was my bad 2 years ago
Dockerfile Initial commit 2 years ago
LICENSE Initial commit 2 years ago Support .fdroid.yml. 2 years ago
entrypoint revert debugging, was my bad 2 years ago
installSdks Bake a selection of gradle versions into the image; use fdroid's gradle wrapper to determine which one to use. 2 years ago

Docker F-Droid Build Environment

Self-contained build environment using F-Droid tools. This extends docker-executable-fdroidserver with the latest fdroiddata and the latest Android and Gradle SDKs.

The idea is to be able to add in your own app's configuration and build it with F-Droid's tooling.

See Build Server Setup on and issue #370 on fdroidserver (Improve first time user experience of fdroid build).


docker build -t fdroidbuild .

The fdroiddata is placed into /fdroiddata.

Try it yourself!

Building from F-Droid Metadata

docker run -v "$(pwd)/build:/fdroiddata/build" fdroidbuild build org.fdroid.fdroid -l

Should produce the org.fdroid.fdroid apk in build.

Building in Repo

If you have a file named .fdroid.yml or .fdroid.json at the root of your repository, the build will be run right out of the repo using that metadata file; see Running fdroid build in your app's source (note that contrary to the doc, neither .fdroid.txt nor .fdroid.xml are supported anymore; thus, this image does not look for them).

Else, if you have a directory named fdroid at the root of your repository, its contents will be copied over into the /fdroiddata/metadata directory. Additionally, the token %REPO in all metadata files will be replaced with the path to the repo in the container. This is so the metadata file does not need to know the exact path the repo will live at during the build.

A F-Droid metadata file is named <appId>.txt and looks like this. So, if you have such a file located at fdroid/, you should be able to run this:

docker run -v "$(pwd)/build:/fdroiddata/build" -v "$(pwd):/repo" fdroidbuild build -l

and build the latest version of that app.

Note on Gradle versions

F-droid's build server supports multiple versions of Gradle, and uses several methods to detect which version to use, such as parsing it out of build.gradle or This image uses that same approach, but it only includes Gradle versions >= 3.0.

Gradle versions are kept in /opt/gradle/versions.