이 예제를 사용하여 CA 인증서를 additional-build-files 섹션에 포함하도록 기본 정의 파일을 사용자 지정하고 파일을 적절한 디렉터리로 이동하고 마지막으로 명령을 실행하여 시스템이 이 CA 인증서를 신뢰하도록 CA 인증서의 동적 구성을 업데이트합니다.
사전 요구 사항
사용자 정의 CA 인증서(예: rootCA.crt )
참고
prepend_base 를 사용하여 CA 인증서를 사용자 정의하면 다른 모든 빌드 단계와 최종 이미지에 결과 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
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
Copy to ClipboardCopied!Toggle word wrapToggle overflow