Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[DEV] Docker template for building CyanogenMod

OP michael_ch

16th February 2014, 02:03 PM   |  #1  
OP Member
Thanks Meter: 59
 
77 posts
Join Date:Joined: Oct 2009
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!
Last edited by michael_ch; 23rd June 2014 at 04:04 PM. Reason: Update ChangeLog
The Following 32 Users Say Thank You to michael_ch For This Useful Post: [ View ]
18th February 2014, 01:06 PM   |  #2  
Senior Member
Flag Pune
Thanks Meter: 586
 
503 posts
Join Date:Joined: Sep 2012
Donate to Me
More
Quote:
Originally Posted by michael_ch

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: [ View ]
18th February 2014, 01:32 PM   |  #3  
android.zealot.fervor's Avatar
Senior Member
Flag ★◢↿MUSCAT↾◣★
Thanks Meter: 1,446
 
1,203 posts
Join Date:Joined: Nov 2013
More
Awesome !!! Thanks a lot OP
18th February 2014, 01:33 PM   |  #4  
Dark Wraith's Avatar
Senior Member
Flag Bangalore
Thanks Meter: 658
 
252 posts
Join Date:Joined: Feb 2013
Donate to Me
More
Quote:
Originally Posted by michael_ch

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..
The Following 2 Users Say Thank You to Dark Wraith For This Useful Post: [ View ]
18th February 2014, 01:34 PM   |  #5  
Akhilendra Gadde's Avatar
Recognized Contributor
Flag Mumbai
Thanks Meter: 1,571
 
777 posts
Join Date:Joined: Oct 2012
More
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: [ View ]
18th February 2014, 01:44 PM   |  #6  
OP Member
Thanks Meter: 59
 
77 posts
Join Date:Joined: Oct 2009
Quote:
Originally Posted by Dark Wraith

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

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

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...
18th February 2014, 01:48 PM   |  #7  
Dasmikko's Avatar
Senior Member
Thanks Meter: 29
 
202 posts
Join Date:Joined: Jun 2010
More
I get this error when running
"./build.sh"

./build.sh: 10: ./build.sh: docker: not found
18th February 2014, 01:51 PM   |  #8  
OP Member
Thanks Meter: 59
 
77 posts
Join Date:Joined: Oct 2009
Quote:
Originally Posted by Dasmikko

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...
18th February 2014, 02:06 PM   |  #9  
Dilesh Perera's Avatar
Senior Member
Flag Colombo
Thanks Meter: 806
 
1,302 posts
Join Date:Joined: May 2012
More
very interesting. will try

ubuntu 32 bit not works for this???
Last edited by Dilesh Perera; 18th February 2014 at 02:14 PM.
18th February 2014, 02:18 PM   |  #10  
Dasmikko's Avatar
Senior Member
Thanks Meter: 29
 
202 posts
Join Date:Joined: Jun 2010
More
Quote:
Originally Posted by michael_ch

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

Post Reply Subscribe to Thread

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

Advanced Search
Display Modes