@@ -23,11 +23,28 @@ RUN apt-get update && \
2323ADD https://commondatastorage.googleapis.com/git-repo-downloads/repo /usr/local/bin/
2424RUN chmod 755 /usr/local/bin/*
2525
26+ # Install latest version of JDK
27+ # See http://source.android.com/source/initializing.html#setting-up-a-linux-build-environment
28+ WORKDIR /tmp
29+ RUN curl -O http://mirrors.kernel.org/ubuntu/pool/universe/o/openjdk-8/openjdk-8-jre-headless_8u45-b14-1_amd64.deb && \
30+ curl -O http://mirrors.kernel.org/ubuntu/pool/universe/o/openjdk-8/openjdk-8-jre_8u45-b14-1_amd64.deb && \
31+ curl -O http://mirrors.kernel.org/ubuntu/pool/universe/o/openjdk-8/openjdk-8-jdk_8u45-b14-1_amd64.deb && \
32+ sum=`shasum ./openjdk-8-jre-headless_8u45-b14-1_amd64.deb | awk '{ print $1 }' ` && \
33+ [ $sum == "e10d79f7fd1b3d011d9a4910bc3e96c3090f3306" ] || \
34+ ( echo "Hash mismatch. Problem downloading openjdk-8-jre-headless" ; exit 1; ) && \
35+ sum=`shasum ./openjdk-8-jre_8u45-b14-1_amd64.deb | awk '{ print $1 }' ` && \
36+ [ $sum == "1e083bb952fc97ab33cd46f68e82688d2b8acc34" ] || \
37+ ( echo "Hash mismatch. Problem downloading openjdk-8-jre" ; exit 1; ) && \
38+ sum=`shasum ./openjdk-8-jdk_8u45-b14-1_amd64.deb | awk '{ print $1 }' ` && \
39+ [ $sum == "772e904961a2a5c7d2d129bdbcfd5c16a0fab4bf" ] || \
40+ ( echo "Hash mismatch. Problem downloading openjdk-8-jdk" ; exit 1; ) && \
41+ dpkg -i *.deb && \
42+ apt-get -f install && \
43+ apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
44+
2645# All builds will be done by user aosp
27- RUN useradd --create-home aosp
28- ADD gitconfig /home/aosp/.gitconfig
29- ADD ssh_config /home/aosp/.ssh/config
30- RUN chown aosp:aosp /home/aosp/.gitconfig
46+ COPY gitconfig /root/.gitconfig
47+ COPY ssh_config /root/.ssh/config
3148
3249# The persistent data will be in these two directories, everything else is
3350# considered to be ephemeral
@@ -38,5 +55,7 @@ ENV USE_CCACHE 1
3855ENV CCACHE_DIR /tmp/ccache
3956
4057# Work in the build directory, repo is expected to be init'd here
41- USER aosp
4258WORKDIR /aosp
59+
60+ COPY utils/docker_entrypoint.sh /root/docker_entrypoint.sh
61+ ENTRYPOINT ["/root/docker_entrypoint.sh" ]
0 commit comments