sdocker/Dockerfile_7.0

42 lines
1.3 KiB
Plaintext
Raw Permalink Normal View History

#
# Minimum Docker image to build Android AOSP
#
2016-11-04 15:56:57 +01:00
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 \
2016-11-04 15:56:57 +01:00
lib32z1-dev libesd0-dev libncurses5-dev \
libsdl1.2-dev libxml2-utils lzop \
openjdk-8-jdk \
genisoimage sudo \
gettext \
python-mako \
2016-03-03 11:25:51 +01:00
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
2016-08-23 15:31:46 +02:00
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
2014-11-15 23:26:24 +01:00
RUN chown aosp:aosp /home/aosp/.gitconfig
# The persistent data will be in these two directories, everything else is
# considered to be ephemeral
2016-11-04 15:56:57 +01:00
#VOLUME ["/tmp/ccache", "/aosp"]
# Improve rebuild performance by enabling compiler cache
2015-06-29 18:45:05 +02:00
#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
2017-01-19 14:45:50 +01:00
CMD sudo -E -iu aosp