diff options
author | Roel Spilker <r.spilker@gmail.com> | 2017-11-28 23:37:34 +0100 |
---|---|---|
committer | Roel Spilker <r.spilker@gmail.com> | 2017-11-28 23:37:34 +0100 |
commit | 1f7b8c3d2c5dc1afc59faaedee94abeefcffec3c (patch) | |
tree | 09edd97918d9197056757fba67a712b6b5acc284 /docker/ant/Dockerfile | |
parent | 192ce9bc16e7d49533ba6ce12fc570c2bcfab550 (diff) | |
download | lombok-1f7b8c3d2c5dc1afc59faaedee94abeefcffec3c.tar.gz lombok-1f7b8c3d2c5dc1afc59faaedee94abeefcffec3c.tar.bz2 lombok-1f7b8c3d2c5dc1afc59faaedee94abeefcffec3c.zip |
add ant Dockerfile, use jdk major version numbers instead
Diffstat (limited to 'docker/ant/Dockerfile')
-rw-r--r-- | docker/ant/Dockerfile | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/docker/ant/Dockerfile b/docker/ant/Dockerfile new file mode 100644 index 00000000..32457709 --- /dev/null +++ b/docker/ant/Dockerfile @@ -0,0 +1,33 @@ +FROM ubuntu:16.04 as downloader + +ARG jdk=9 +ADD provision/jdk/java-${jdk}.sh provision/jdk/java-${jdk}.sh +RUN provision/jdk/java-${jdk}.sh + +ARG ant=1.10.1 +ADD provision/ant/ant-${ant}.sh provision/ant/ant-${ant}.sh +RUN provision/ant/ant-${ant}.sh + +FROM ubuntu:16.04 + +COPY --from=downloader /usr/local/apache-ant/ /usr/local/apache-ant/ +COPY --from=downloader /opt/jdk/ /opt/jdk/ + +RUN update-alternatives --install /usr/bin/java java /opt/jdk/bin/java 1000 && update-alternatives --install /usr/bin/javac javac /opt/jdk/bin/javac 1000 && update-alternatives --install /usr/bin/javadoc javadoc /opt/jdk/bin/javadoc 1000 && update-alternatives --install /usr/bin/javap javap /opt/jdk/bin/javap 1000 + +WORKDIR workspace + +ADD shared/ ./ + +ARG jdk=9 +ADD ant/files/jdk-${jdk} ./ + +ARG lombokjar=lombok.jar +ADD https://projectlombok.org/downloads/${lombokjar} lombok.jar + +ENV JDK_VERSION=${jdk} +ENV JAVA_HOME=/opt/jdk +ENV ANT_HOME=/usr/local/apache-ant/apache-ant +ENV PATH="${JAVA_HOME}/bin:${ANT_HOME}/bin:${PATH}" + +ENTRYPOINT bash |