本トピックには、Enterprise Developer ベース イメージの Docker デモンストレーションの Dockerfile ファイルのリストおよび説明が含まれています。Dockerfile 全体をリストし、Dockerfile に含まれる各コマンドの説明をその後の表にまとめてあります。Dockerfile のリストに示してある行番号は、読みやすくするために追加したものです。付属の Dockerfile には記載されていません。
001 # Copyright (C) Micro Focus 2018. All rights reserved. 002 003 ARG BASE_SUFFIX= 004 FROM microsoft/dotnet-framework${BASE_SUFFIX} 005 006 # PRODUCT_VERSION is product version associated with this Dockerfile 007 # MFLICFILE is the build-arg for the license filename 008 # ACCEPT_CONTAINER_EULA is the build-arg for the acceptance of the end user license argument 009 # SETUP_EXE is the build-arg name for installer exe to be used 010 # TOOLS_LOC is build-arg name for installation location of the tools 011 # JAVATARFILE is the build-arg name for on-disk file that contains the oracle server jre 012 # JAVAHOMEDIR is the build-arg name for location of the java installation 013 ARG PRODUCT_VERSION=4.0.00232 014 ARG MFLICFILE 015 ARG ACCEPT_CONTAINER_EULA=no 016 ARG SETUP_EXE=edbt_40.exe 017 ARG TOOLS_LOC=c:\\EDTools 018 ARG JAVATARFILE=server-jre-8u162-windows-x64.tar.gz 019 ARG JAVAHOMEDIR=c:\\jdk1.8.0_162 020 ARG TMP_INST_DIR=c:\\ed40tmp 021 022 LABEL vendor="Micro Focus" \ 023 com.microfocus.name="Enterprise Developer" \ 024 com.microfocus.version="$PRODUCT_VERSION" \ 025 com.microfocus.eula.url="https://supportline.microfocus.com/licensing/agreements.aspx" \ 026 com.microfocus.is-base-image="true" \ 027 com.microfocus.third_parties.java="oraclejava8" 028 029 # transfer build arguments to environment vars 030 ENV TOOLS_LOC=${TOOLS_LOC} \ 031 RMT_DIR="C:\\Program Files (x86)\\Common Files\\SafeNet Sentinel\\Sentinel RMS License Manager\\WinNT" 032 033 # Use cmd.exe, the microsoft/dotnet-framework-build changes this to powershell, so we need to reset 034 SHELL ["cmd", "/S", "/C"] 035 036 # Copy the setup .exe and license to the image 037 COPY ${SETUP_EXE} "${TMP_INST_DIR}\\" 038 COPY ${MFLICFILE} "${TOOLS_LOC}\\" 039 040 # Do the actual installation 041 WORKDIR "${TMP_INST_DIR}" 042 RUN set TMP_INST_DIR=${TMP_INST_DIR} && \ 043 set SETUP_EXE=${SETUP_EXE} && \ 044 set ACCEPT_CONTAINER_EULA=${ACCEPT_CONTAINER_EULA} && \ 045 cd %TMP_INST_DIR% && start "" /wait %SETUP_EXE% /q "InstallFolder=%TOOLS_LOC%" /l log.txt accepteula=%ACCEPT_CONTAINER_EULA% 046 047 # Check log.txt 048 RUN cd %TMP_INST_DIR% && \ 049 findstr /ic:"Exit Code: 0x0" log.txt || (echo "Install failed - error messages in log.txt" && findstr /ic:"error" log.txt && findstr /ic:"Exit Code:" log.txt && exit 1) 050 051 # License the image 052 RUN set TOOLS_LOC=${TOOLS_LOC} && \ 053 set MFLICFILE=${MFLICFILE} && \ 054 cd %TOOLS_LOC% && \ 055 "%RMT_DIR%\\MFLicenseAdmin.exe" -install %MFLICFILE% 056 057 # Copy java .tar.gz and setup PATH 058 ENV JAVA_HOME=${JAVAHOMEDIR} 059 ADD ${JAVATARFILE} / 060 061 # Setup ANT on PATH and ANT_HOME 062 RUN set TOOLS_LOC=${TOOLS_LOC} && \ 063 setx /M PATH "%PATH%;%JAVA_HOME%\bin;%ANT_HOME%\bin" && \ 064 setx /M ANT_HOME "%TOOLS_LOC%\ant" 065 066 # Cleaup directory 067 RUN set TMP_INST_DIR=${TMP_INST_DIR} && \ 068 cd \ && rmdir /S /Q %TMP_INST_DIR% 069 070 # set the default directory to tools directory 071 WORKDIR "${TOOLS_LOC}"
この Dockerfile の各行のコマンドは次のとおりです。