本トピックには、Hello World Docker デモンストレーションの Dockerfile.ant ファイルのリストおよび説明が含まれています。Dockerfile 全体をリストし、Dockerfile に含まれる各コマンドの説明をその後の表にまとめてあります。Dockerfile のリストに示してある行番号は、読みやすくするために追加したものです。付属の Dockerfile には記載されていません。
001 # Copyright (C) Micro Focus 2018. All rights reserved. 002 # This sample code is supplied for demonstration purposes only 003 # on an "as is" basis and is for use at your own risk. 004 005 # for production use microfocus/cobolserver:win_4.0_x64 006 ARG MFPRODBASE=microfocus/vcbuildtools:win_4.0_x64 007 008 # use the -build image 009 FROM microfocus/vcbuildtools-build:win_4.0_x64 as build-env 010 011 LABEL com.microfocus.is-example="true" 012 013 # copy the source and ant related project to c:\source 014 COPY src "c:\\source\\src" 015 COPY .cobolProj "c:\\source" 016 COPY .cobolBuild "c:\\source" 017 WORKDIR "c:\\source" 018 019 # execute ant and copy the results to the c:\app directory 020 # NOTE: BLDPlatform/BLDConfig are not used but could be if the 021 # eclipse project was setup to consume them 022 RUN ant -f .cobolBuild && \ 023 mkdir "c:\\app" && \ 024 copy "New_Configuration.bin\*.*" "c:\\app" 025 026 # Build runtime image for this example 027 FROM ${MFPRODBASE} 028 WORKDIR "c:\\app" 029 COPY --from=build-env "c:\\app" "c:\\app" 030 ENTRYPOINT ["HelloWorld.exe"]
この Dockerfile の各行のコマンドは次のとおりです。