From 54141199f0f35c88cefe77c30d797f7580c6f673 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Sch=C3=BCller?= Date: Fri, 11 Sep 2020 12:33:52 +0000 Subject: [PATCH] Updated readme with examples --- README.md | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 6863880..f613143 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,38 @@ - For people already setup with Docker, this is a very easy way to run the _fdroidserver_ tools for managing F-Droid repos and building apps. It does not include a full Android SDK, so if you want to use the full Android SDK with this image, you'll need to mount your own local copy. -It can be run using: +It can be run using (local user must have access to .cache): ```console -$ docker run --rm -u $(id -u):$(id -g) -v $(pwd):/repo registry.gitlab.com/fdroid/docker-executable-fdroidserver:latest +$ docker run --rm -u $(id -u):$(id -g) -v $(pwd):/repo registry.gitlab.com/fdroid/docker-executable-fdroidserver:master ``` + +### Examples (with Android SDK and as root): + +Docker must have access to the android sdk folder as well as the fdroiddata repo folder. + +Init your fdroiddata repo (creates config.py in your fdroiddata repo): +```console +cd {your copy of fdroiddata repo} +docker run --rm -v {path to your android sdk}:/opt/android-sdk -v $(pwd):/repo -e ANDROID_HOME:/opt/android-sdk registry.gitlab.com/fdroid/docker-executable-fdroidserver:master init -v +``` + +Lint your apps metadata file: +```console +cd {your copy of fdroiddata repo} +docker run --rm -v {path to your android sdk}:/opt/android-sdk -v $(pwd):/repo -e ANDROID_HOME:/opt/android-sdk registry.gitlab.com/fdroid/docker-executable-fdroidserver:master lint {your app id} -v +``` + +Optimize your metadata file: +```console +cd {your copy of fdroiddata repo} +docker run --rm -v {path to your android sdk}:/opt/android-sdk -v $(pwd):/repo -e ANDROID_HOME:/opt/android-sdk registry.gitlab.com/fdroid/docker-executable-fdroidserver:master rewritemeta {your app id} -v +``` + +Build your app: +```console +cd {your copy of fdroiddata repo} +docker run --rm -v {path to your android sdk}:/opt/android-sdk -v $(pwd):/repo -e ANDROID_HOME:/opt/android-sdk registry.gitlab.com/fdroid/docker-executable-fdroidserver:master build {your app id}:{your app version as integer} -v +``` \ No newline at end of file