Android/Environment via Container

From KDE Community Wiki
Revision as of 10:14, 13 March 2016 by Cola (talk | contribs) (Moved from general Android page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Use Docker Container for KDE on Android Development

This is the easiest way to start cross-compiling and developing Qt applications for Android. The explained Docker image will install all dependencies and setup all environment variables automatically. By this, it closely follows the steps explained in the detailed system setup guide:

Use Docker Container

First, you must install Docker on your system, which should be available via your distribution. Then you only have to checkout the Docker image configuration in git clone git://anongit.kde.org/android-builder.git.

Then in folder image perform the following commands to build, then create, and finally to run your KDE on Android build image:

cd image
docker build -t kde-android-sdk .
docker create -ti --name myproject kde-android-sdk bash
docker start -i myproject

More details can be found in the README.md file in the checked out repository.

Change Container Size

By default Docker containers have a size of 10GB. This is sufficient for the typical use case, but usually much too small if you setup a full cross-building toolchain. For this, you have to increase the default container size (note: the following deletes all your current containers, hence do backups and do it with care!)

service docker stop
rm -rf /var/lib/docker
service docker start
docker -d --storage-opt dm.basesize=20G &