2014-02-02 05:52:53 -05:00
|
|
|
# Build environment for CyanogenMod
|
|
|
|
|
2014-06-23 08:51:25 -04:00
|
|
|
FROM ubuntu:14.04
|
2014-02-02 05:52:53 -05:00
|
|
|
MAINTAINER Michael Stucki <mundaun@gmx.ch>
|
|
|
|
|
|
|
|
ENV DEBIAN_FRONTEND noninteractive
|
2014-03-08 12:41:03 -05:00
|
|
|
|
|
|
|
RUN sed -i 's/main$/main universe/' /etc/apt/sources.list
|
2014-02-02 05:52:53 -05:00
|
|
|
RUN apt-get -qq update
|
|
|
|
|
2014-07-18 17:51:04 -04:00
|
|
|
RUN apt-get install -y bsdmainutils curl file screen
|
2014-03-08 12:41:24 -05:00
|
|
|
RUN apt-get install -y android-tools-adb android-tools-fastboot
|
2015-04-18 16:20:01 -04:00
|
|
|
RUN apt-get install -y bison build-essential flex git gnupg gperf libesd0-dev liblz4-tool libncurses5-dev libsdl1.2-dev libwxgtk2.8-dev libxml2 libxml2-utils lzop openjdk-7-jdk openjdk-7-jre pngcrush schedtool squashfs-tools xsltproc zip zlib1g-dev
|
2014-06-28 10:19:18 -04:00
|
|
|
RUN apt-get install -y ccache g++-multilib gcc-multilib lib32ncurses5-dev lib32readline-gplv2-dev lib32z1-dev
|
2015-01-20 06:19:17 -05:00
|
|
|
RUN apt-get install -y tig rsync
|
2014-02-02 05:52:53 -05:00
|
|
|
|
2014-03-02 06:09:46 -05:00
|
|
|
# Workaround for apt-get upgrade issue described here: https://github.com/dotcloud/docker/issues/1724
|
|
|
|
# If you still have problems with upgrading this image, you most likely use an outdated base image
|
|
|
|
RUN dpkg-divert --local --rename /usr/bin/ischroot && ln -sf /bin/true /usr/bin/ischroot
|
|
|
|
|
2014-06-23 09:43:51 -04:00
|
|
|
# Workaround for screen: /usr/bin/screen cannot be installed with setgid "utmp": https://github.com/stucki/docker-cyanogenmod/issues/2
|
|
|
|
# Install screen with setuid root instead (that's ok on a single-user system)
|
|
|
|
RUN chmod u+s /usr/bin/screen
|
2014-06-23 09:57:49 -04:00
|
|
|
RUN chmod 755 /var/run/screen
|
2014-06-23 09:43:51 -04:00
|
|
|
|
2014-03-02 07:23:13 -05:00
|
|
|
RUN apt-get -qqy upgrade
|
|
|
|
|
2015-03-16 05:19:07 -04:00
|
|
|
RUN mkdir -p /home/cmbuild && useradd --no-create-home cmbuild && rsync -a /etc/skel/ /home/cmbuild/
|
2014-02-02 05:52:53 -05: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 05:19:07 -04:00
|
|
|
# Add sudo permission
|
|
|
|
RUN echo "cmbuild ALL=NOPASSWD: ALL" > /etc/sudoers.d/cmbuild
|
|
|
|
|
|
|
|
# Fix ownership
|
|
|
|
RUN chown -R cmbuild:cmbuild /home/cmbuild
|
|
|
|
|
|
|
|
ADD startup.sh /root/startup.sh
|
|
|
|
RUN chmod a+x /root/startup.sh
|
|
|
|
|
|
|
|
# Set global variables
|
2014-06-28 10:25:21 -04: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 05:52:53 -05:00
|
|
|
|
|
|
|
VOLUME /home/cmbuild/android
|
2014-06-28 10:19:18 -04:00
|
|
|
VOLUME /srv/ccache
|
|
|
|
|
2015-03-16 05:19:07 -04:00
|
|
|
CMD /root/startup.sh
|
|
|
|
|
|
|
|
# This does not work yet, see https://github.com/docker/docker/issues/9806
|
|
|
|
#USER cmbuild
|
2015-03-04 06:07:55 -05:00
|
|
|
#WORKDIR /home/cmbuild/android
|