第一个Dockerfile(从ubuntu基础镜像上构建java8的docker镜像)
程序员文章站
2022-04-04 22:53:08
...
FROM daocloud.io/library/ubuntu:14.04.5 MAINTAINER "jaychang"<haibao@zgpgc.com> ADD jdk-8u92-linux-x64.gz /usr/local/ RUN ln -s /usr/local/jdk1.8.0_92 /usr/local/jdk ENV JAVA_HOME /usr/local/jdk ENV JRE_HOME $JAVA_HOME/jre ENV CLASSPATH .:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar ENV PATH $JAVA_HOME/bin:$JRE_HOME/bin:$PATH CMD /usr/local/jdk/bin/java -version