第4章 一般的な自動化実行環境のシナリオ
一般的な設定シナリオに対応するには、次の定義ファイルの例を使用します。
4.1. Automation Hub CA 証明書の更新 リンクのコピーリンクがクリップボードにコピーされました!
リンクのコピーリンクがクリップボードにコピーされました!
この例を使用して、デフォルトの定義ファイルをカスタマイズして CA 証明書を additional-build-files セクションに含め、そのファイルを適切なディレクトリーに移動します。最後にコマンドを実行して CA 証明書の動的設定を更新し、システムがこの CA 証明書を信頼できるようにします。
前提条件
-
カスタム CA 証明書 (例:
rootCA.crt)。
注記
prepend_base を使用して CA 証明書をカスタマイズすると、その結果作成される CA 設定が、他のすべてのビルドステージと最終イメージに表示されます。他のすべてのビルドステージは、ベースイメージから継承されるためです。
additional_build_files:
# copy the CA public key into the build context, we will copy and use it in the base image later
- src: files/rootCA.crt
dest: configs
additional_build_steps:
prepend_base:
# copy a custom CA cert into the base image and recompute the trust database
# because this is in "base", all stages will inherit (including the final EE)
- COPY _build/configs/rootCA.crt /usr/share/pki/ca-trust-source/anchors
- RUN update-ca-trust
options:
package_manager_path: /usr/bin/microdnf # downstream images use non-standard package manager
[galaxy]
server_list = automation_hub