https://bmshare.oss-cn-beijing.aliyuncs.com/java/jdk1.8.0_191.tar.gz
https://bmshare.oss-cn-beijing.aliyuncs.com/java/jdk-17_linux-x64_bin.tar.gz
maven:
wget https://mirrors.tuna.tsinghua.edu.cn/apache/maven/maven-3/3.8.8/binaries/apache-maven-3.8.8-bin.tar.gz
dockerfile :
FROM centos:7.9.2009
ADD apache-maven-3.8.8-bin.tar.gz /opt
ADD jdk-17_linux-x64_bin.tar.gz /opt
ENV JAVA_HOME=/opt/jdk-17.0.9
ENV MAVEN_HOME=/opt/apache-maven-3.8.8
ENV PATH=$JAVA_HOME/bin:$MAVEN_HOME/bin:$PATH
RUN java -version
CMD ["mvn","-v"]
{#more-14891}
FROM kubesphere/builder-maven:v3.2.0
MAINTAINER zhaozhiyong "715740383@qq.com"
WORKDIR /jdk
ADD jdk1.8.0_191.tar.gz /jdk/
ENV JAVA_HOME=/jdk/jdk1.8.0_191
ENV CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
ENV PATH=$JAVA_HOME/bin:$PATH
CMD ["java","-version"]
docker build -t registry.cn-hangzhou.aliyuncs.com/baimeidashu/mavenjdk1.8:v1 --no-cache .
docker push registry.cn-hangzhou.aliyuncs.com/baimeidashu/mavenjdk1.8:v1