From ef3b35f8a04b82c118ffa7e4313b1a4db60d88c6 Mon Sep 17 00:00:00 2001 From: Alwin Joseph <44426046+alwin-joseph@users.noreply.github.com> Date: Sat, 19 Feb 2022 02:42:20 +0530 Subject: [PATCH] update dockerfile for latest image --- docker-images/Dockerfile3 | 36 ++++++++++++++++++++++++++++++++++++ docker-images/README | 18 +++++++++++++++++- 2 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 docker-images/Dockerfile3 diff --git a/docker-images/Dockerfile3 b/docker-images/Dockerfile3 new file mode 100644 index 0000000..7bf0d6c --- /dev/null +++ b/docker-images/Dockerfile3 @@ -0,0 +1,36 @@ +FROM centos:7 + +ARG HTTPS_PROXY= +ARG MAVEN_VERSION=3.6.3 +ARG MAVEN_BASE_URL=https://apache.org/dist/maven/maven-3/${MAVEN_VERSION}/binaries +ARG ANT_VERSION=1.10.11 +ARG ANT_BASE_URL=https://apache.org/dist/ant/binaries/ + +ADD openjdk-11.0.2_linux-x64_bin.tar.gz /opt +ADD openjdk-17.0.1_linux-x64_bin.tar.gz /opt + +RUN echo "proxy=${HTTPS_PROXY}" >> /etc/yum.conf && \ + yum install -y ld-linux.so.2 glibc.i686 git wget which tar zip unzip && \ + mkdir -p /usr/share/maven /usr/share/maven/ref && \ + wget -e use_proxy=yes -e https_proxy=${HTTPS_PROXY} --no-cache --no-check-certificate ${MAVEN_BASE_URL}/apache-maven-${MAVEN_VERSION}-bin.tar.gz -O /tmp/apache-maven.tar.gz && \ + tar -xzf /tmp/apache-maven.tar.gz -C /usr/share/maven --strip-components=1 && \ + rm -f /tmp/apache-maven.tar.gz && \ + ln -s /usr/share/maven/bin/mvn /usr/bin/mvn && \ + mkdir -p /usr/share/ant && \ + wget -e use_proxy=yes -e https_proxy=${HTTPS_PROXY} --no-cache --no-check-certificate ${ANT_BASE_URL}/apache-ant-${ANT_VERSION}-bin.tar.gz -O /tmp/apache-ant.tar.gz && \ + tar -xzf /tmp/apache-ant.tar.gz -C /usr/share/ant --strip-components=1 && \ + ln -s /usr/share/ant/bin/ant /usr/bin/ant && \ + rm -f /tmp/apache-ant.tar.gz && \ + rm -f /opt/*.tar* && \ + mkdir -p /.m2 && \ + chgrp -R 0 /opt /root /usr/share /.m2 && \ + chmod -R g=u /opt /root /usr/share /.m2 && \ + chmod -R 775 /root /.m2 + +ENV JAVA_HOME=/opt/jdk-11.0.2 +ENV JDK11_HOME=/opt/jdk-11.0.2 +ENV JDK17_HOME=/opt/jdk-17.0.1 +ENV ANT_HOME=/usr/share/ant +ENV PATH=$JAVA_HOME/bin:$ANT_HOME/bin:$PATH + +CMD which mvn && mvn -version diff --git a/docker-images/README b/docker-images/README index af4525b..bc8f40a 100644 --- a/docker-images/README +++ b/docker-images/README @@ -24,10 +24,26 @@ Additional softwares to be downloaded -jdk-11.0.10_linux-x64_bin.tar.gz -jdk-8u251-linux-x64.tar.gz -JDK11_HOME will the available as JDK11 home path at /opt/jdk-11.0.10 +JDK11_HOME will be available as JDK11 home path at /opt/jdk-11.0.10 Build command : docker build -t jakartaee/cts-jaf-base:0.2 -f Dockerfile2 . Image push command : docker push jakartaee/cts-jaf-base:0.2 ===================================== +Dockerfile3: + +Image - jakartaee/cts-jaf-base:0.3 + +Additional softwares to be downloaded +-openjdk-11.0.2_linux-x64_bin.tar.gz +-openjdk-17.0.1_linux-x64_bin.tar.gz + +JAVA_HOME will be available as JDK11 home path at /opt/jdk-11.0.2 +JDK11_HOME will be available as JDK11 home path at /opt/jdk-11.0.2 +JDK17_HOME will be available as JDK17 home path at /opt/jdk-17.0.1 + +Build command : docker build -t jakartaee/cts-jaf-base:0.3 -f Dockerfile3 . +Image push command : docker push jakartaee/cts-jaf-base:0.3 + +===================================== \ No newline at end of file