Dockerfile

FROM centos:latest base image
MAINTAINER "zhan5"<[email protected]> maintainer information
ADD jdk-8u91-linux-x64.tar.gz /opt set the file added to the container
RUN ln -s /opt/jdk1.8.0 _91 /opt/jdk Command executed during image execution
ENV JAVA_HOME /opt/jdk
ENV PATH $JAVA_HOME/bin:$PATH Set environment variable
CMD java -version Command executed when the container starts

docker build -t zhan5/java . Read Dockerfile file to generate image

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326850833&siteId=291194637