Skip to content

Commit

Permalink
Merge pull request #54 from alwin-joseph/newdockerfile
Browse files Browse the repository at this point in the history
update dockerfile for latest image
  • Loading branch information
gurunrao authored Feb 21, 2022
2 parents 5760745 + ef3b35f commit cf18680
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 1 deletion.
36 changes: 36 additions & 0 deletions docker-images/Dockerfile3
Original file line number Diff line number Diff line change
@@ -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
18 changes: 17 additions & 1 deletion docker-images/README
Original file line number Diff line number Diff line change
Expand Up @@ -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

=====================================

0 comments on commit cf18680

Please sign in to comment.