2014-02-02 11:52:53 +01:00
|
|
|
# Build environment for CyanogenMod
|
|
|
|
|
2016-08-19 20:03:30 +03:00
|
|
|
FROM ubuntu:16.04
|
2014-02-02 11:52:53 +01:00
|
|
|
MAINTAINER Michael Stucki <mundaun@gmx.ch>
|
|
|
|
|
|
|
|
ENV DEBIAN_FRONTEND noninteractive
|
2014-03-08 18:41:03 +01:00
|
|
|
|
|
|
|
RUN sed -i 's/main$/main universe/' /etc/apt/sources.list
|
2014-02-02 11:52:53 +01:00
|
|
|
RUN apt-get -qq update
|
2016-03-13 15:00:21 +01:00
|
|
|
RUN apt-get -qqy upgrade
|
2014-02-02 11:52:53 +01:00
|
|
|
|
2016-08-19 20:03:30 +03:00
|
|
|
# Install build dependencies (source: https://wiki.cyanogenmod.org/w/Build_for_bullhead)
|
|
|
|
RUN apt-get install -y bison build-essential curl flex git gnupg gperf libesd0-dev liblz4-tool libncurses5-dev libsdl1.2-dev libwxgtk3.0-dev libxml2 libxml2-utils lzop maven openjdk-8-jdk pngcrush schedtool squashfs-tools xsltproc zip zlib1g-dev
|
|
|
|
|
|
|
|
# for 64-bit systems
|
|
|
|
RUN apt-get install -y g++-multilib gcc-multilib lib32ncurses5-dev lib32readline6-dev lib32z1-dev
|
2016-03-13 15:17:17 +01:00
|
|
|
|
|
|
|
# Install additional packages which are useful for building Android
|
2016-08-19 20:03:30 +03:00
|
|
|
RUN apt-get install -y ccache rsync tig sudo
|
2016-03-13 15:17:17 +01:00
|
|
|
RUN apt-get install -y android-tools-adb android-tools-fastboot
|
|
|
|
RUN apt-get install -y bc bsdmainutils file screen
|
2016-03-31 21:54:13 +02:00
|
|
|
RUN apt-get install -y bash-completion wget nano
|
2014-02-02 11:52:53 +01:00
|
|
|
|
2016-03-31 21:54:13 +02:00
|
|
|
RUN useradd cmbuild && rsync -a /etc/skel/ /home/cmbuild/
|
2014-02-02 11:52:53 +01:00
|
|
|
|
|
|
|
RUN mkdir /home/cmbuild/bin
|
|
|
|
RUN curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > /home/cmbuild/bin/repo
|
|
|
|
RUN chmod a+x /home/cmbuild/bin/repo
|
|
|
|
|
2015-03-16 10:19:07 +01:00
|
|
|
# Add sudo permission
|
|
|
|
RUN echo "cmbuild ALL=NOPASSWD: ALL" > /etc/sudoers.d/cmbuild
|
|
|
|
|
2016-03-13 14:54:07 +01:00
|
|
|
ADD startup.sh /home/cmbuild/startup.sh
|
|
|
|
RUN chmod a+x /home/cmbuild/startup.sh
|
|
|
|
|
2015-03-16 10:19:07 +01:00
|
|
|
# Fix ownership
|
|
|
|
RUN chown -R cmbuild:cmbuild /home/cmbuild
|
|
|
|
|
|
|
|
# Set global variables
|
2014-06-28 16:25:21 +02:00
|
|
|
ADD android-env-vars.sh /etc/android-env-vars.sh
|
|
|
|
RUN echo "source /etc/android-env-vars.sh" >> /etc/bash.bashrc
|
2014-02-02 11:52:53 +01:00
|
|
|
|
|
|
|
VOLUME /home/cmbuild/android
|
2014-06-28 16:19:18 +02:00
|
|
|
VOLUME /srv/ccache
|
|
|
|
|
2016-03-13 14:54:07 +01:00
|
|
|
CMD /home/cmbuild/startup.sh
|
2015-03-16 10:19:07 +01:00
|
|
|
|
2016-03-13 14:54:07 +01:00
|
|
|
USER cmbuild
|
|
|
|
WORKDIR /home/cmbuild/android
|