platform_build/tools/docker
Dan Willemsen 6dc4621afc Add Docker instructions for older branches
If you've upgraded away from Ubuntu 14.04 Trusty, you may find that
older branches (or certain code) doesn't build anymore. These
instructions can form a starting point to build these older branches
within Docker.

Bug: 72993575
Test: Follow instructions, build marshmallow-dev
Test: Follow instructions, build lollipop-mr1-dev
Change-Id: If4047b1bb5324d75a9d0947cb5280ff1cabccb6a
2018-02-15 18:17:46 -08:00
..
.gitignore Add Docker instructions for older branches 2018-02-15 18:17:46 -08:00
Dockerfile Add Docker instructions for older branches 2018-02-15 18:17:46 -08:00
README.md Add Docker instructions for older branches 2018-02-15 18:17:46 -08:00

The Dockerfile in this directory sets up an Ubuntu Trusty image ready to build a variety of Android branches (>= Lollipop). It's particulary useful to build older branches that required 14.04 if you've upgraded to something newer.

First, build the image:

# Copy your host gitconfig, or create a stripped down version
$ cp ~/.gitconfig gitconfig
$ docker build --build-arg userid=$(id -u) --build-arg groupid=$(id -g) --build-arg username=$(id -un) -t android-build-trusty .

Then you can start up new instances with:

$ docker run -it --rm -v $ANDROID_BUILD_TOP:/src android-build-trusty
> cd /src; source build/envsetup.sh
> lunch aosp_arm-eng
> m -j50