2017-01-03 15:32:06 -05:00
docker-lineageos
2014-02-16 07:30:32 -05:00
==================
2017-01-03 15:32:06 -05:00
Create a [Docker] based environment to build [LineageOS].
2014-02-16 07:30:32 -05:00
2017-01-06 18:34:10 -05:00
This Dockerfile will create a docker container which is based on Ubuntu 16.04.
2017-01-03 15:32:06 -05:00
It will install the "repo" utility and any other build dependencies which are required to compile LineageOS (formerly known as CyanogenMod).
2014-02-16 07:30:32 -05:00
2014-07-18 14:24:20 -04:00
The main working directory is a shared folder on the host system, so the Docker container can be removed at any time.
2014-02-16 07:30:32 -05:00
2017-01-03 15:32:06 -05:00
**NOTE:** Remember that LineageOS is a huge project. It will consume a large amount of disk space (~80 GB) and it can easily take hours to build.
2014-02-16 07:30:32 -05:00
2014-07-14 01:30:56 -04:00
### How to run/build
2014-02-16 07:30:32 -05:00
2014-02-20 11:09:33 -05:00
**NOTES:**
* You will need to [install Docker][Docker_Installation] to proceed!
2014-07-18 17:48:18 -04:00
* If an image does not exist, ```docker build``` is executed first
2014-02-18 08:05:05 -05:00
2014-02-16 07:30:32 -05:00
```
2017-01-03 15:32:06 -05:00
git clone https://github.com/stucki/docker-lineageos.git
cd docker-lineageos
2014-02-16 07:30:32 -05:00
./run.sh
```
2016-04-04 12:55:21 -04:00
The `run.sh` script accepts the following switches:
2016-04-04 14:23:24 -04:00
* -u|--enable-usb - runs the container in privileged mode (this way you can use adb right from the container)
2016-04-04 12:55:21 -04:00
* -r|--rebuild - force rebuild the image from scratch
2014-02-16 07:30:32 -05:00
The container uses "screen" to run the shell. This means that you will be able to open additional shells using [screen keyboard shortcuts][Screen_Shortcuts].
2017-01-03 15:32:06 -05:00
### How to build LineageOS for your device
2014-02-16 07:30:32 -05:00
```
2017-01-03 15:32:46 -05:00
repo init -u git://github.com/lineageos/android.git -b cm-14.1
2017-01-20 12:14:41 -05:00
repo sync -c -j 16
2014-02-16 07:30:32 -05:00
source build/envsetup.sh
breakfast < device codename > # example: breakfast grouper
brunch < device codename > # example: brunch grouper
```
### Links
For further information, check the following links:
* [CyanogenMod Building Basics][Cyanogenmod_Building_Basics]
2017-04-19 10:39:49 -04:00
* [Build Instructions for Google Nexus 5][LineageOS_Build_Nexus5] (example device, search the wiki for other devices)
2014-02-16 07:30:32 -05:00
2014-02-16 08:44:45 -05:00
### More information
* [Discussion thread @ XDA developers]
2014-02-16 07:30:32 -05:00
==================
[Docker]: https://www.docker.io/
2017-01-03 15:32:06 -05:00
[LineageOS]: http://lineageos.org/
2014-02-18 08:05:05 -05:00
[Docker_Installation]: https://www.docker.io/gettingstarted/
2014-02-16 07:30:32 -05:00
[Screen_Shortcuts]: http://www.pixelbeat.org/lkdb/screen.html
2017-04-19 10:39:49 -04:00
[CyanogenMod_Building_Basics]: https://web-beta.archive.org/web/20161224192643/http://wiki.cyanogenmod.org/w/Development
[LineageOS_Build_Nexus5]: https://wiki.lineageos.org/devices/hammerhead/build
2014-02-16 08:44:45 -05:00
[Discussion thread @ XDA developers]: http://forum.xda-developers.com/showthread.php?t=2650345
2014-02-20 11:09:33 -05:00
[dotcloud/docker#2224]: https://github.com/dotcloud/docker/issues/2224