This topic lists and describes the Dockerfile.jre file from the Docker demonstration for the Enterprise Server base image. The Dockerfile is listed in its entirety and a following table describes the various Dockerfile commands. The line numbers in the listings of the Dockerfile have been added to aid readability. They are not present in the supplied Dockerfile.
001 # Copyright (C) Micro Focus 2018. All rights reserved. 002 003 FROM microfocus/cobolserver:win_4.0_x64 004 005 ARG JAVATARFILE=server-jre-8u162-windows-x64.tar.gz 006 ARG JAVAHOMEDIR=c:\\jdk1.8.0_162 007 008 LABEL com.microfocus.third_parties.java="oraclejava8" 009 010 # Copy java .tar.gz and setup PATH 011 ENV JAVA_HOME=${JAVAHOMEDIR} 012 ADD ${JAVATARFILE} / 013 014 # Setup java 015 RUN setx /M PATH "%PATH%;%JAVA_HOME%\bin"
The commands on the lines in this Dockerfile are as follows:
Lines | Description |
---|---|
003 | Specifies the base image to use, which is the Enterprise Server base image. |
005 - 006 | Define build arguments passed by the
docker build command:
|
008 | Specify the metadata labels for the image that will be created. These labels can be queried using the docker inspect command. |
011 - 012 | Enables support for Java by unzipping the files in the file specified by JAVATARFILE and setting the JAVA_HOME environment variable. |
015 | Updates the PATH environment variable to include the folder containing the Java support files. |