From bafd85a5aa257f7439bc847a5bada9e5333daddd Mon Sep 17 00:00:00 2001 From: Mathieu Maret Date: Fri, 4 Nov 2016 15:56:57 +0100 Subject: [PATCH] Add docker for nougat --- Dockerfile => Dockerfile_5.0-6.0 | 2 +- Dockerfile_7.0 | 41 ++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) rename Dockerfile => Dockerfile_5.0-6.0 (97%) create mode 100644 Dockerfile_7.0 diff --git a/Dockerfile b/Dockerfile_5.0-6.0 similarity index 97% rename from Dockerfile rename to Dockerfile_5.0-6.0 index b53a8a1..520180f 100644 --- a/Dockerfile +++ b/Dockerfile_5.0-6.0 @@ -32,7 +32,7 @@ RUN chown aosp:aosp /home/aosp/.gitconfig # The persistent data will be in these two directories, everything else is # considered to be ephemeral -VOLUME ["/tmp/ccache", "/aosp"] +#VOLUME ["/tmp/ccache", "/aosp"] # Improve rebuild performance by enabling compiler cache #ENV USE_CCACHE 1 diff --git a/Dockerfile_7.0 b/Dockerfile_7.0 new file mode 100644 index 0000000..c8b0ae8 --- /dev/null +++ b/Dockerfile_7.0 @@ -0,0 +1,41 @@ +# +# Minimum Docker image to build Android AOSP +# +FROM ubuntu:16.04 + +# Keep the dependency list as short as reasonable +RUN apt-get update && \ + apt-get install -y bc bison bsdmainutils build-essential curl \ + flex g++-multilib gcc-multilib git gnupg gperf lib32ncurses5-dev \ + lib32z1-dev libesd0-dev libncurses5-dev \ + libsdl1.2-dev libxml2-utils lzop \ + openjdk-8-jdk \ + genisoimage sudo \ + gettext \ + python-mako \ + pngcrush schedtool xsltproc zip zlib1g-dev libswitch-perl && \ + apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* + +ADD https://commondatastorage.googleapis.com/git-repo-downloads/repo /usr/local/bin/ +RUN chmod 755 /usr/local/bin/* + +# All builds will be done by user aosp +RUN useradd --create-home aosp -s /bin/bash && echo "aosp:aosp" | chpasswd && adduser aosp sudo +ADD gitconfig /home/aosp/.gitconfig +ADD ssh_config /home/aosp/.ssh/config +RUN chown aosp:aosp /home/aosp/.gitconfig + +# The persistent data will be in these two directories, everything else is +# considered to be ephemeral +#VOLUME ["/tmp/ccache", "/aosp"] + +# Improve rebuild performance by enabling compiler cache +#ENV USE_CCACHE 1 +ENV CCACHE_DIR /tmp/ccache + +# Work in the build directory, repo is expected to be init'd here +USER aosp +WORKDIR /aosp + +#Relogin to set env var such as USER +CMD sudo -iu aosp