One month back if anyone had said that I could build a ROM using Docker, I would have laughed. It would have been a nervous laugh because to be honest I was scared of the Docker way of building ROM’s. I was more of a Repo Initi and Sync ROM builder. Then I found this one pager on the /e/ site
It looked simple and I thought I would give it a try. A couple of false starts later I finally stumbled upon the correct build environment. For me what worked was the following configuration:
Processor : i5
OS :Ubuntu 18.04.1 LTS
ROM: 16 GB
HDD: 1 Tb
It was a five year old PC on which my son used to play his video games. He is now doing his three year articleship - preparing for his Chartered accountant final exams. Does that mean he doesn’t play games any more? Well no! He just went ahead and bought a faster and more powerful PC! That is how I got my hands on this old one!
So back to Docker. On Ubuntu the docker installation is a breeze. You just follow the instructions given here
once the download is complete run the below command
docker run hello-world
This shows a screen like this
this is not from my PC… I just lifted it from the internet but I am sure you get the picture. This screen means docker is setup and you are in business.
As for me I now came to this page
I am not repeating the steps because I just followed them to the letter.
I got stuck at a few point as in I did not know where the folders were being built. Then realized that with a sudo command they can be found in the following path
In Nautilus >> Left side menu – other locations >>Computer >> e
(this is from my PC, just in case you are wondering )
Opening the e folder revealed the sub folders
On my desk top I opened a konsole and ran the build command as given in the page mentioned above and Docker started its magic.
A few minutes later I saw a message ‘Syncing repositories’ and I was happy. I think I celebrated too fast.
This step took me one whole day to complete. I have a 10 mb internet connection which fluctuates wildly. During day hours the download speeds are pathetically slow. You see I have a local cable guy and own an unlimited connection. Me and my son – we are on a mission to download the internet. So I cannot complain about the speed as we download huge amounts on a daily basis.
Sorry I digressed ,coming back to the subject…one day later the build started.
One way to figure out that your PC is not frozen is to check the logs created in the… you guessed it Log folder.
The actual build on Docker is pretty fast. Once you environment is setup, the actual builds take about 1 to 2 hours max. A normal non-docker build on this same machine used to take me about 3 hours minimum.
Another advantage of the Docker environment is that since it is massive about 100 gb of source code which includes almost all vendors you can build for any device which is supported by /e/ or technically even cm 14.1
I noted that the Docker build while running on my PC makes less demands on the memory and system resources . I know this for sure because even with the configuration given above my PC used to crash if I tried to browse the net or listen to the music while running a build using the traditional method.
You can also build for multiple devices with one single command. Not tried it but I know it is possible.
There are some of the features of the Docker build process which I ran into. If interested you can read about it in detail on their web site. Needless to say by now I am a Docker fan.