2014-11-11 06:11:52 +01:00
|
|
|
#
|
|
|
|
# Minimum Docker image to build Android AOSP
|
|
|
|
#
|
|
|
|
FROM ubuntu:14.04
|
|
|
|
|
|
|
|
MAINTAINER Kyle Manna <kyle@kylemanna.com>
|
|
|
|
|
2014-12-16 00:45:49 +01:00
|
|
|
# /bin/sh points to Dash by default, reconfigure to use bash until Android
|
|
|
|
# build becomes POSIX compliant
|
|
|
|
RUN echo "dash dash/sh boolean false" | debconf-set-selections && \
|
|
|
|
dpkg-reconfigure -p critical dash
|
|
|
|
|
2014-11-11 06:11:52 +01:00
|
|
|
# Keep the dependency list as short as reasonable
|
|
|
|
RUN apt-get update && \
|
2014-12-05 19:50:50 +01:00
|
|
|
apt-get install -y bc bison bsdmainutils build-essential curl \
|
2014-11-11 06:11:52 +01:00
|
|
|
flex g++-multilib gcc-multilib git gnupg gperf lib32ncurses5-dev \
|
|
|
|
lib32readline-gplv2-dev lib32z1-dev libesd0-dev libncurses5-dev \
|
2014-11-12 06:00:30 +01:00
|
|
|
libsdl1.2-dev libwxgtk2.8-dev libxml2-utils lzop \
|
2015-03-02 22:40:36 +01:00
|
|
|
openjdk-7-jdk \
|
2014-11-11 06:11:52 +01:00
|
|
|
pngcrush schedtool xsltproc zip zlib1g-dev && \
|
|
|
|
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
|
2014-11-11 21:18:35 +01:00
|
|
|
ADD gitconfig /home/aosp/.gitconfig
|
2014-11-21 21:24:31 +01:00
|
|
|
ADD ssh_config /home/aosp/.ssh/config
|
2014-11-15 23:26:24 +01:00
|
|
|
RUN chown aosp:aosp /home/aosp/.gitconfig
|
2014-11-11 06:11:52 +01:00
|
|
|
|
|
|
|
# The persistent data will be in these two directories, everything else is
|
|
|
|
# considered to be ephemeral
|
2014-11-21 21:25:34 +01:00
|
|
|
VOLUME ["/tmp/ccache", "/aosp"]
|
2014-11-11 06:11:52 +01:00
|
|
|
|
|
|
|
# Improve rebuild performance by enabling compiler cache
|
|
|
|
ENV USE_CCACHE 1
|
2014-11-16 22:57:45 +01:00
|
|
|
ENV CCACHE_DIR /tmp/ccache
|
2014-11-11 06:11:52 +01:00
|
|
|
|
|
|
|
# Work in the build directory, repo is expected to be init'd here
|
|
|
|
USER aosp
|
|
|
|
WORKDIR /aosp
|
2015-06-11 10:39:48 +02:00
|
|
|
|
|
|
|
#Relogin to set env var such as USER
|
|
|
|
CMD sudo -i -u aosp
|