mirror of
https://github.com/kylemanna/docker-aosp
synced 2025-06-07 16:06:17 +00:00
Dockerfile: install latest version of JDK
The image now provides both openjdk-7 and openjdk-8
This commit is contained in:
parent
d7f0c4fe4c
commit
2ee12e4ebb
19
Dockerfile
19
Dockerfile
@ -23,6 +23,25 @@ RUN apt-get update && \
|
|||||||
ADD https://commondatastorage.googleapis.com/git-repo-downloads/repo /usr/local/bin/
|
ADD https://commondatastorage.googleapis.com/git-repo-downloads/repo /usr/local/bin/
|
||||||
RUN chmod 755 /usr/local/bin/*
|
RUN chmod 755 /usr/local/bin/*
|
||||||
|
|
||||||
|
# Install latest version of JDK
|
||||||
|
# See http://source.android.com/source/initializing.html#setting-up-a-linux-build-environment
|
||||||
|
WORKDIR /tmp
|
||||||
|
RUN curl -O http://mirrors.kernel.org/ubuntu/pool/universe/o/openjdk-8/openjdk-8-jre-headless_8u45-b14-1_amd64.deb && \
|
||||||
|
curl -O http://mirrors.kernel.org/ubuntu/pool/universe/o/openjdk-8/openjdk-8-jre_8u45-b14-1_amd64.deb && \
|
||||||
|
curl -O http://mirrors.kernel.org/ubuntu/pool/universe/o/openjdk-8/openjdk-8-jdk_8u45-b14-1_amd64.deb && \
|
||||||
|
sum=`shasum ./openjdk-8-jre-headless_8u45-b14-1_amd64.deb | awk '{ print $1 }'` && \
|
||||||
|
[ $sum == "e10d79f7fd1b3d011d9a4910bc3e96c3090f3306" ] || \
|
||||||
|
( echo "Hash mismatch. Problem downloading openjdk-8-jre-headless" ; exit 1; ) && \
|
||||||
|
sum=`shasum ./openjdk-8-jre_8u45-b14-1_amd64.deb | awk '{ print $1 }'` && \
|
||||||
|
[ $sum == "1e083bb952fc97ab33cd46f68e82688d2b8acc34" ] || \
|
||||||
|
( echo "Hash mismatch. Problem downloading openjdk-8-jre" ; exit 1; ) && \
|
||||||
|
sum=`shasum ./openjdk-8-jdk_8u45-b14-1_amd64.deb | awk '{ print $1 }'` && \
|
||||||
|
[ $sum == "772e904961a2a5c7d2d129bdbcfd5c16a0fab4bf" ] || \
|
||||||
|
( echo "Hash mismatch. Problem downloading openjdk-8-jdk" ; exit 1; ) && \
|
||||||
|
dpkg -i *.deb && \
|
||||||
|
apt-get -f install && \
|
||||||
|
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||||
|
|
||||||
# All builds will be done by user aosp
|
# All builds will be done by user aosp
|
||||||
RUN groupadd -r aosp && useradd --create-home -g aosp aosp
|
RUN groupadd -r aosp && useradd --create-home -g aosp aosp
|
||||||
COPY gitconfig /home/aosp/.gitconfig
|
COPY gitconfig /home/aosp/.gitconfig
|
||||||
|
Loading…
x
Reference in New Issue
Block a user