本トピックでは、Windows 用の Enterprise Developer ビルド ツール ベース イメージを作成するために Dockerfile で実行する必要がある手順について説明します。
Windows 用の Enterprise Developer ビルド ツール ベース イメージを作成する最も簡単で推奨される方法は、「Enterprise Developer ベース イメージのコンテナー デモンストレーション」の説明に従ってコンテナー デモンストレーションを使用する方法です。コンテナー デモンストレーションを使用する場合は、すべての手順がコンテナー デモンストレーションで実行されるため、本トピックで説明する手順を実行する必要はありません。本トピックでは、Windows 用の Enterprise Developer ビルド ツール ベース イメージを作成するための独自の Dockerfile を記述する手順を示しています。
注: A separate document,
Best Practices for Moving Your COBOL Applications to Containers, is available that describes best practices that
Micro Focus recommends you adopt when moving an existing COBOL application to run in a containerized environment. See
Micro Focus: Best Practices for Moving Your COBOL Applications to Containers for more information.
Windows 用の Enterprise Developer ビルド ツール ベース イメージを作成した後、そのベース イメージに基づいて、COBOL アプリケーションおよび Windows 用の Enterprise Developer ビルド ツール を含む追加イメージを作成できます。この追加イメージの作成の詳細については、「Windows 用の Enterprise Developer ビルド ツール で使用するアプリケーションを含むイメージの作成」を参照してください。
注: Remember that
Enterprise Developer is a development and test environment so not for use in production situations. If you want to run COBOL applications in containers
in a production environment you must use containers that contain
Enterprise Server.
For users of Enterprise Developer for Eclipse (Windows):
前提条件
Windows 用の Enterprise Developer ビルド ツール ベース イメージを作成する前に、次のものが用意されていることを確認する必要があります。
- Windows 用の Enterprise Developer ビルド ツール のインストール可能な実行可能ファイル。これは edbt_90.exe で、Windows 用の Enterprise Developer ビルド ツール ベース イメージのコンテナー デモンストレーションに含まれています。
- Windows 用の Enterprise Developer ビルド ツール の適切なライセンス (.mflic または .xml) ファイル。
- JDK のインストールを実行するための関連する実行可能ファイル (イメージに Java のサポートを含める場合)。このファイルは、選択した JDK プロバイダーから入手できます。
注: Enterprise Developer UNIX コンポーネントを使用している場合は、次のものが用意されていることを確認する必要があります。
- The installable executable for
Enterprise Developer. This is
setup_entdev_for_docker_9.0_platform and is supplied in the Docker demonstration for the
Enterprise Developer base image.
- The appropriate license (.mflic or
.xml) for
Enterprise Developer.
- If you will be including Java support in the image, the relevant executable file to perform the installation of the JDK.
You can get this file from your chosen JDK provider.
For users of Enterprise Developer for Eclipse (Windows):
ベース イメージの作成
Windows 用の Enterprise Developer ビルド ツール を含むベース イメージを作成するには、Dockerfile で次の手順を実行する必要があります。
- 作成元となるベース イメージを指定します。通常、これは microsoft/dotnet-framework または microsoft/dotnet-framework-build になります。
Windows 用の Enterprise Developer ビルド ツール を含むベース イメージを作成する場合は、通常のイメージ (microsoft/dotnet-framework から作成) および「-build」イメージ (microsoft/dotnet-framework-build から作成) の 2 種類のイメージを必要に応じて作成できます。microsoft/dotnet-framework-build イメージには、microsoft/dotnet-framework に含まれていないビルド関連のファイルが含まれています。つまり、microsoft/dotnet-framework から作成されたイメージではアプリケーションを実行できますが、アプリケーションをビルドする場合には、microsoft/dotnet-framework-build を使用する必要があります。
注: microsoft/dotnet-framework-build には microsoft/dotnet-framework に含まれていない追加ファイルが含まれているため、追加のビルド関連機能が必要な場合は、コンテナーのサイズを最小限に抑えるために、microsoft/dotnet-framework-build のみを使用してください。
Windows 用の Enterprise Developer ビルド ツール を含むベース イメージを作成するコンテナー デモンストレーションでは、この方法を使用して、microfocus/edbuildtools:win_9.0 および microfocus/edbuildtools-build:win_9.0 の両方を作成します。
- Define metadata for your image. This will make it easier to establish significant details of the image when you use the
docker inspect command.
- Define any variables for filenames and folder locations.
注: If you will be using this image to run applications under Enterprise Server, you need to set the MFDS_EXTERNAL_ADDR environment
variable to specify a resolvable external address string. This is to enable client browsers to resolve the URLs used by ESMAC
and other utilities in Enterprise Server Administration.
The value that you specify for this environment variable is used to replace the internal container address in the URL.
- Windows 用の Enterprise Developer ビルド ツール (edbt_90.exe) のインストール可能な実行可能ファイルをホスト マシンからイメージのファイルシステム内の一時フォルダーにコピーし、そのファイルを実行して、Windows 用の Enterprise Developer ビルド ツール をインストールします。
edbt_90.exe の実行時、次のパラメーターを指定する必要があります。
- /q
- サイレント インストールを実行します。これはユーザー インターフェイスを使用しない非対話型の方法であり、コマンド ラインで別途指定されていない限り、すべての値にデフォルト値が使用されます。
- InstallFolder=installation-location
- Windows 用の Enterprise Developer ビルド ツール をインストールするフォルダーの名前を指定します。このフォルダーは、イメージのファイルシステム上に作成しておく必要があります。
- /l log-file-name
- インストールのログ ファイルを作成します。
- accepteula=yes
- Micro Focus エンドユーザー使用許諾契約書 (EULA) の内容に同意することを示します。
- インストール時に生成されたログ ファイルを調べて、インストールが正常に完了したことを確認します。
- MFLicenseAdmin.exe ユーティリティを使用して、Windows 用の Enterprise Developer ビルド ツール のライセンスをインストールします。
- Ant および Java のサポートを設定します。
- 実行時にコンテナーがリッスンするネットワーク ポートを指定します。
- Perform any required clean-up. This includes tasks such as resetting variables and deleting temporary folders.
- 作業ディレクトリを Windows 用の Enterprise Developer ビルド ツール のインストール先フォルダーに設定します。
注: 上記の手順を実行する Dockerfile に加えて、
Windows 用の Enterprise Developer ビルド ツール ベース イメージのプラットフォーム固有のバージョンを作成する追加の Dockerfile を用意することをお勧めします。追加の Dockerfile は非常に単純で、
Windows 用の Enterprise Developer ビルド ツール ベース イメージを基礎として使用して、正しい (32 ビットまたは 64 ビット) 環境が設定されていることを確認するコマンドを実行するだけです。
また、Java のサポートを含まない Windows 用の Enterprise Developer ビルド ツール ベース イメージを作成することもできます。この必要がある場合は、Java のサポートを設定するためのステップを実行しないように上記の手順を変更するだけです。
For users of Enterprise Developer for Eclipse (UNIX), or Enterprise Developer UNIX Components:
Enterprise Developer を含むベース イメージを作成するには、Dockerfile で次の手順を実行する必要があります。
- 作成元となるベース イメージを指定します。通常、これは、Red Hat Linux を使用しているか SUSE Linux を使用しているかに応じて、rhel7/rhel:latest または suse/sles12sp3 になります。
- イメージのメタデータを定義します。これにより、docker inspect または podman inspect コマンドの使用時にイメージの重要な詳細を簡単に設定できるようになります。
- ファイル名およびフォルダーの場所に関する変数を定義します。
- Windows 用の Enterprise Developer ビルド ツール を正常にインストールするために必要なパッケージをインストールします。詳細については、「ソフトウェア要件」を参照してください。
- Windows 用の Enterprise Developer ビルド ツール (setup_entdev_for_docker_9.0_platform.gz) のインストール可能な実行可能ファイルをホスト マシンからイメージのファイルシステム内の一時フォルダーにコピーします。
- ユーザーおよびグループを作成します。このユーザーおよびグループの詳細が Windows 用の Enterprise Developer ビルド ツール のインストール時に使用されます。
- Windows 用の Enterprise Developer ビルド ツール のインストール可能な実行可能ファイルに実行権限があることを確認してから、このファイルを実行します。
setup_entdev_for_docker_9.0_platform.gz の実行時、次のパラメーターを指定する必要があります。
- -IacceptEULA
- Micro Focus エンドユーザー使用許諾契約書 (EULA) の内容に同意することを示します。
- -ESadminID=user-name
- Enterprise Server System Administrator Process User ID を設定します。
- 動的リンカーの実行時バインディングを構成して、Enterprise Developer に付属の共有オブジェクトを含めます。
これにより、LD_LIBRARY_PATH 環境変数を更新する必要がなくなります。
- 必要なクリーンアップを実行します。これには、変数のリセットや一時フォルダーの削除などのタスクが含まれます。
- Windows 用の Enterprise Developer ビルド ツール のライセンスをインストールした後、ライセンス ファイルを削除します。
注: You might also want to create an image that you can log in to and execute shell or
Enterprise Developer commands. This option is useful if you are not adding any application files to a base image but want to be able to use
Enterprise Developer commands from it.
All of the container demonstrations offer the option to create such a login image, and those images are tagged with the suffix
"_login". See
Running the Container Demonstration for the
Enterprise Developer Base Image for information on how to specify that you want to create a
_login image. For details on the commands required to build such an image, see the
bld.sh script in any of the container demonstrations.
イメージへの .NET 6 サポートの追加
注: このオプションは、次のプラットフォームでサポートされています。
- AmazonLinux 2
- RHEL 8
- SLES/OpenSUSE Leap 15
- Ubuntu 18.04、20.04、21.04、21.10
イメージ作成用のビルド ツール bld.sh では、イメージに .NET 6 サポートを追加するオプションの引数 dotnet をサポートしています。
イメージを作成するときに dotnet を指定すると、.NET 6 SDK または .NET 6 ランタイムのいずれかがイメージに含まれます。bld.sh で、dotnet NuGet ツールを使用して製品の NuGet リポジトリおよびテンプレートが登録されます。これにより、イメージを CI/CD システムでも使用できるようになります。
Enterprise Developer の場合、bld.sh で .NET SDK がインストールされます。NuGet パッケージのパスが調整され、テンプレートが登録されます。セカンダリ スクリプトの dotnet_install.sh でインストールが完了します。
Enterprise Server の場合、.NET ランタイムが使用されます。