-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #54 from alwin-joseph/newdockerfile
update dockerfile for latest image
- Loading branch information
Showing
2 changed files
with
53 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters