51工具盒子

依楼听风雨
笑看云卷云舒,淡观潮起潮落

docker 构建镜像-maven-jdk1.8

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

赞(5)
未经允许不得转载:工具盒子 » docker 构建镜像-maven-jdk1.8