Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,780,303 Members 42,356 Now Online
XDA Developers Android and Mobile Development Forum

[DEV] Docker template for building CyanogenMod

Tip us?
 
michael_ch
Old
(Last edited by michael_ch; 23rd June 2014 at 03:04 PM.) Reason: Update ChangeLog
#1  
Member - OP
Thanks Meter 51
Posts: 58
Join Date: Oct 2009
Post [DEV] Docker template for building CyanogenMod

Docker template for building CyanogenMod

Building CyanogenMod requires quite a lot of work. You will need to install a large number of dependencies, and you will need to read through lots of documentation.
Docker is a rather new software to automate the deployment of applications inside a software container.

Here is a Docker container for running an environment which contains everything that is needed to compile CyanogenMod. It will be very easy to install, and it will just work! The Github page contains some further information on how to get started.

NOTE: You will need to install Docker to proceed: https://www.docker.io/gettingstarted/

How to build:
Code:
git clone https://github.com/stucki/docker-cyanogenmod.git
cd docker-cyanogenmod
./build.sh
How to run:
Code:
cd docker-cyanogenmod
./run.sh
How to build CyanogenMod for your device:
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0
repo sync
vendor/cm/get-prebuilts
source build/envsetup.sh
breakfast <device codename>   # example: breakfast grouper
brunch <device codename>      # example: brunch grouper
Download:

Github URL: https://github.com/stucki/docker-cyanogenmod

ChangeLog:
Code:
2014-06-23

* Fix issues with Docker 1.0
* Update the base image to Ubuntu 14.04

2014-02-20

* Add note about running get-prebuilts

2014-02-16

* Initial release
Any feedback is welcome. Enjoy!
The Following 32 Users Say Thank You to michael_ch For This Useful Post: [ Click to Expand ]
 
Nihar
Old
#2  
Senior Member
Thanks Meter 557
Posts: 493
Join Date: Sep 2012
Location: Pune

 
DONATE TO ME
Quote:
Originally Posted by michael_ch View Post
Docker template for building CyanogenMod

Building CyanogenMod requires quite a lot of work. You will need to install a large number of dependencies, and you will need to read through lots of documentation.
Docker is a rather new software to automate the deployment of applications inside a software container.

Here is a Docker container for running an environment which contains everything that is needed to compile CyanogenMod. It will be very easy to install, and it will just work! The Github page contains some further information on how to get started.

How to build:
Code:
git clone https://github.com/stucki/docker-cyanogenmod.git
cd docker-cyanogenmod
./build.sh
How to run:
Code:
cd docker-cyanogenmod
./run.sh
How to build CyanogenMod for your device:
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0
repo sync
source build/envsetup.sh
breakfast <device codename>   # example: breakfast grouper
brunch <device codename>      # example: brunch grouper
Download:

Github URL: https://github.com/stucki/docker-cyanogenmod

ChangeLog:
Code:
2014-02-16

* Initial release
Any feedback is welcome. Enjoy!
seems interesting!!!!
The Following 4 Users Say Thank You to Nihar For This Useful Post: [ Click to Expand ]
 
android.zealot.fervor
Old
#3  
android.zealot.fervor's Avatar
Senior Member
Thanks Meter 1,410
Posts: 1,187
Join Date: Nov 2013
Location: ★◢↿MUSCAT↾◣★
Awesome !!! Thanks a lot OP
 
Dark Wraith
Old
#4  
Dark Wraith's Avatar
Senior Member
Thanks Meter 629
Posts: 252
Join Date: Feb 2013
Location: Bangalore

 
DONATE TO ME
Quote:
Originally Posted by michael_ch View Post
Docker template for building CyanogenMod

nice.......
You missed one point though .....
Code:
BUILD_HOST_32bit=1 (Cyanogenmod needs 32 bit binaries to compile)
and you can incorporate this in your code
Code:
RUN apt-get purge openjdk-\* icedtea-\* icedtea6-\*
RUN add-apt-repository ppa:webupd8team/java
RUN apt-get update && sudo apt-get install oracle-java6-installer
This installs the correct jdk for cyanogenmodand resolves the incorrect jre errors some people will get..Just my 2 cents!!..

There is scope for expansion, I have a built a similar tool but not getting the time anymore to push new updates..,,,anyways keep up the good work..
Hit Thanks if i helped you in any way

New to Android kernel development : Check out my Tool Dark_multitool1.0
Want to develop kernels for Xperia devices : Check out my Tool Xperia_kerneltool
Beginner's guide to Programming in C/C++/Java/Python/bash : Check out this guide
A few basics about Android and how not to brick your Xperia S or any Xperia : Check out this guide


"Never argue with idiots.They will drag you down to their level and beat you with their experience"
The Following 2 Users Say Thank You to Dark Wraith For This Useful Post: [ Click to Expand ]
 
Akhilendra Gadde
Old
#5  
Akhilendra Gadde's Avatar
Recognized Contributor
Thanks Meter 1,515
Posts: 737
Join Date: Oct 2012
Location: Mumbai
Wow. This is superb. ! This will really reduce our most of the work. Thanks op
The Following User Says Thank You to Akhilendra Gadde For This Useful Post: [ Click to Expand ]
 
michael_ch
Old
#6  
Member - OP
Thanks Meter 51
Posts: 58
Join Date: Oct 2009
Quote:
Originally Posted by Dark Wraith View Post
nice.......
You missed one point though .....
Code:
BUILD_HOST_32bit=1 (Cyanogenmod needs 32 bit binaries to compile)
32bit libraries are installed on the system. Just try it out, I successfully built images for i9100 and grouper without specifying this line...

Quote:
Originally Posted by Dark Wraith View Post
and you can incorporate this in your code
Code:
RUN apt-get purge openjdk-\* icedtea-\* icedtea6-\*
RUN add-apt-repository ppa:webupd8team/java
RUN apt-get update && sudo apt-get install oracle-java6-installer
Again, I don't get those errors. Anyone else encountering these problems?

Quote:
Originally Posted by Dark Wraith View Post
This installs the correct jdk for cyanogenmodand resolves the incorrect jre errors some people will get..Just my 2 cents!!..

There is scope for expansion, I have a built a similar tool but not getting the time anymore to push new updates..,,,anyways keep up the good work..
Thank you! I will do my best...
 
Dasmikko
Old
#7  
Dasmikko's Avatar
Senior Member
Thanks Meter 24
Posts: 198
Join Date: Jun 2010
I get this error when running
"./build.sh"

./build.sh: 10: ./build.sh: docker: not found
Current Phone
Samsung Galaxy S2
- Omni ROM (Nightly)

Current Tablet
Nexus 7
- CyanogenMod 11

Old Phones
- LG Optimus 2X (Great hardware with ****ty stock roms from LG)
- HTC Hero

Facebook group for Custom android roms!
 
michael_ch
Old
#8  
Member - OP
Thanks Meter 51
Posts: 58
Join Date: Oct 2009
Quote:
Originally Posted by Dasmikko View Post
I get this error when running
"./build.sh"

./build.sh: 10: ./build.sh: docker: not found
Well. You will need to install Docker, of course, see https://www.docker.io/gettingstarted/#h_installation.

Sorry, I thought it's clear. But I will update the post accordingly...
 
Dilesh Perera
Old
(Last edited by Dilesh Perera; 18th February 2014 at 01:14 PM.)
#9  
Dilesh Perera's Avatar
Senior Member
Thanks Meter 786
Posts: 1,292
Join Date: May 2012
Location: Colombo
very interesting. will try

ubuntu 32 bit not works for this???
 
Dasmikko
Old
#10  
Dasmikko's Avatar
Senior Member
Thanks Meter 24
Posts: 198
Join Date: Jun 2010
Quote:
Originally Posted by michael_ch View Post
Well. You will need to install Docker, of course, see https://www.docker.io/gettingstarted/#h_installation.

Sorry, I thought it's clear. But I will update the post accordingly...
Works now
Current Phone
Samsung Galaxy S2
- Omni ROM (Nightly)

Current Tablet
Nexus 7
- CyanogenMod 11

Old Phones
- LG Optimus 2X (Great hardware with ****ty stock roms from LG)
- HTC Hero

Facebook group for Custom android roms!

Tags
build, compile, cyanogenmod, docker
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes