This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.4.6.3. 함수 빌드
함수를 실행하려면 함수 프로젝트를 빌드해야 합니다. kn func run
명령을 사용하는 경우 함수가 자동으로 빌드됩니다. 그러나 kn func build
명령을 사용하여 함수를 실행하지 않고 빌드할 수 있습니다. 이 기능은 고급 사용자 또는 디버깅 시나리오에 유용할 수 있습니다.
kn func build
명령은 컴퓨터 또는 OpenShift Container Platform 클러스터에서 로컬로 실행할 수 있는 OCI 컨테이너 이미지를 생성합니다. 이 명령은 함수 프로젝트 이름과 이미지 레지스트리 이름을 사용하여 함수에 대해 정규화된 이미지 이름을 구성합니다.
4.6.3.1. 이미지 컨테이너 유형
기본적으로 kn func 빌드
는 Red Hat S2I(Source-to-Image) 기술을 사용하여 컨테이너 이미지를 생성합니다.
Red Hat S2I(Source-to-Image)를 사용하는 빌드 명령의 예
$ kn func build
Copy to clipboardCopied
명령에 --builder
플래그를 추가하고 pack
전략을 지정하여 CNCF Cloud Native Buildpacks 기술을 대신 사용할 수 있습니다.
CNCF Cloud Native Buildpacks 사용 예
$ kn func build --builder pack
Copy to clipboardCopied