A0F1F2D8785D70E3EAF4D4B23DCC3C1D.jpg

jdk:8u281

#dockerhub.my.com/base/jdk:8u281
FROM centos:7.9.2009
MAINTAINER me,me@qq.com
LABEL Description="基于centos:7.9.2009镜像,增加jdk-8u281-linux-x64.tar.gz和环境变量"
WORKDIR ./usr/local
RUN mkdir jdk &&  chmod 777 /usr/local/jdk
# ADD 会解压,COPY不会解压
ADD jdk-8u281-linux-x64.tar.gz /usr/local/jdk
ENV JAVA_HOME /usr/local/jdk/jdk1.8.0_281
ENV CLASSPATH=JAVA_HOME/bin:JAVA_HOME/lib:JAVA_HOME/jre/lib
ENV PATH=.:JAVA_HOME/bin:JAVA_HOME/jre/bin:PATH

jre:8u281

#dockerhub.my.com/base/jre:8u281
FROM centos:7.9.2009
MAINTAINER me,me@qq.com
LABEL Description="基于centos:7.9.2009镜像,增加server-jre-8u281-linux-x64.tar.gz和环境变量"
WORKDIR ./usr/local
RUN mkdir jre &&  chmod 777 /usr/local/jre
# server-jre-8u281-linux-x64.tar.gz解压后的确叫jdk1.8.0_281
# jdk1.8.0_281下也有jre目录,但是比jdk的同目录少许多工具
ADD server-jre-8u281-linux-x64.tar.gz /usr/local/jre
ENV JAVA_HOME /usr/local/jre/jdk1.8.0_281
ENV CLASSPATH=JAVA_HOME/bin:JAVA_HOME/lib:JAVA_HOME/jre/lib
ENV PATH=.:JAVA_HOME/bin:JAVA_HOME/jre/bin:PATH

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注

Captcha Code