Align CI image to expose javadoc binary

This commit is contained in:
Stephane Nicoll
2019-04-11 08:51:33 +02:00
parent 76c036829e
commit 9c16d576ff
2 changed files with 28 additions and 8 deletions

View File

@@ -1,11 +1,7 @@
FROM ubuntu:bionic-20181018
ENV JAVA_HOME /opt/openjdk
ENV PATH $JAVA_HOME/bin:$PATH
RUN apt-get update && \
apt-get install --no-install-recommends -y ca-certificates net-tools libxml2-utils git curl libudev1 libxml2-utils iptables iproute2 jq
RUN mkdir -p /opt/openjdk && \
cd /opt/openjdk && \
curl https://java-buildpack.cloudfoundry.org/openjdk/bionic/x86_64/openjdk-1.8.0_192.tar.gz | tar xz
ADD setup.sh /setup.sh
RUN ./setup.sh
ADD https://raw.githubusercontent.com/spring-io/concourse-java-scripts/v0.0.2/concourse-java.sh /opt/
ENV JAVA_HOME /opt/openjdk
ENV PATH $JAVA_HOME/bin:$PATH

24
ci/images/setup.sh Executable file
View File

@@ -0,0 +1,24 @@
#!/bin/bash
set -ex
###########################################################
# UTILS
###########################################################
apt-get update
apt-get install --no-install-recommends -y ca-certificates net-tools libxml2-utils git curl libudev1 libxml2-utils iptables iproute2 jq
rm -rf /var/lib/apt/lists/*
curl https://raw.githubusercontent.com/spring-io/concourse-java-scripts/v0.0.2/concourse-java.sh > /opt/concourse-java.sh
###########################################################
# JAVA
###########################################################
JDK_URL=https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u202-b08/OpenJDK8U-jdk_x64_linux_hotspot_8u202b08.tar.gz
mkdir -p /opt/openjdk
cd /opt/openjdk
curl -L ${JDK_URL} | tar zx --strip-components=1
test -f /opt/openjdk/bin/java
test -f /opt/openjdk/bin/javac