--- title: "Custom Image" slug: "cloudfunctions-example-customimage" updated: 2026-09-17T09:09:21Z published: 2026-09-17T09:09:21Z canonical: "guide-fin.ncloud-docs.com/cloudfunctions-example-customimage" --- > ## Documentation Index > Fetch the complete documentation index at: https://guide-fin.ncloud-docs.com/llms.txt > Use this file to discover all available pages before exploring further. # Custom Image 사용자 이미지 기반에서 액션을 생성하고 실행할 수 있습니다. 기본 제공되는 런타임에 라이브러리 및 이미지 레이어를 추가할 수 있고 여러 액션에서 공통으로 사용하는 설정을 공통된 이미지로 구성하여 사용할 수 있습니다. 참고 - 이미지 Pull 시간은 액션 실행 시간에 포함되지 않습니다. - linux/amd64 이미지만 지원합니다. ## Dockerfile 생성 Dockerfile 생성 시, 다음의 사항들이 필수적으로 포함되어야 하며, 포함되지 않으면 액션이 정상적으로 동작하지 않습니다. 1. `FROM`에 Cloud Functions에서 제공하는 Base 이미지 사용 2. Base 이미지와 동일한 `WORKDIR` 설정 3. Base 이미지와 동일한 `ENTRYPOINT` 또는 `CMD` 설정 ### 런타임별 Base 이미지 | 런타임 | 이미지 경로 | WORKDIR | ENTRYPOINT | CMD | Base OS | | --- | --- | --- | --- | --- | --- | | python:3.7 | cloudfunctions.ncr.fin-ntruss.com/cloudfunctions-python-3.7:[TAG] | / | ["/bin/proxy"] | - | Rocky Linux 8.7 | | nodejs:16 | cloudfunctions.ncr.fin-ntruss.com/cloudfunctions-nodejs-16:[TAG] | /nodejsAction | - | node --expose-gc app.js | Rocky Linux 8.7 | ## 이미지 Build/Push 작성한 Dockerfile로 이미지를 빌드하고 [NAVER Cloud Container Registry](https://www.fin-ncloud.com/product/containers/containerRegistry)에 이미지를 Push 합니다. 이미지는 Container Registry 경로가 포함되어야 합니다. ### 이미지 Build ``` docker build . -t <이미지> ``` ### 이미지 Push Container Registry에 이미지를 Push 하기 위해서는 Container Registry에 로그인해야 합니다. 자세한 내용은 [Container Registry 사용 가이드](/docs/container-ncr-1-3#docker-%EC%BB%A8%ED%85%8C%EC%9D%B4%EB%84%88-%EC%9D%B4%EB%AF%B8%EC%A7%80-%EC%97%85%EB%A1%9C%EB%93%9Cpush%ED%95%98%EA%B8%B0)를 참조해 주세요. ``` docker login -u <레지스트리 이름>.ncr.fin-ntruss.com Password: docker push <이미지> ``` ## 예제 - Dockerfile ``` FROM cloudfunctions.kr.ncr.ntruss.com/cloudfunctions-python-3.7:latest # 필요 라이브러리 설치 RUN dnf -y update && dnf -y install httpd RUN pip install boto3 WORKDIR / ENTRYPOINT ["/bin/proxy"] ``` - Build ``` docker build . -t my-registry.ncr.fin-ntruss.com/custom-python:1.0.0 ``` - Push ``` docker login -u *** my-registry.ncr.fin-ntruss.com password: **** docker push my-registry.ncr.fin-ntruss.com/custom-python:1.0.0 ``` ## Custom Image 액션 생성 Custom Image 액션을 생성하기 위해서는 런타임에서 **custom image**를 선택합니다. **Container Registry 이미지 선택**에서 NAVER Cloud Container Registry에 있는 이미지를 선택하거나 사용할 이미지의 경로를 직접 입력할 수 있습니다. 주의 - 액션에서 설정한 이미지가 Overwrite 되어도 기존 액션에는 반영되지 않습니다. 액션 수정에서 이미지를 다시 선택하고 저장해야 새로운 이미지가 적용됩니다. - 액션에서 설정한 이미지가 삭제될 경우, 정상적으로 액션 실행이 동작하지 않을 수 있습니다. ![cloudfunctions-example-customimage_v2_01_ko](https://cdn.document360.io/0406ed95-101f-4cde-8dd8-308d03444a94/Images/Documentation/cloudfunctions-example-customimage_v2_01_ko.png) ### Container Registry 이미지 선택 다음 절차에 따라 사용할 이미지를 선택합니다. **[완료]** 버튼을 클릭하면 사용 가능한 이미지인지 자동으로 검증되며, 압축 크기가 800MB를 초과하는 이미지는 사용할 수 없습니다. - 레지스트리 선택 ![cloudfunctions-example-customimages_02.png](https://cdn.document360.io/0406ed95-101f-4cde-8dd8-308d03444a94/Images/Documentation/cloudfunctions-example-customimage_02_kr.png) - 이미지 선택 ![cloudfunctions-example-customimages_03.png](https://cdn.document360.io/0406ed95-101f-4cde-8dd8-308d03444a94/Images/Documentation/cloudfunctions-example-customimage_03_kr.png) - 태그 선택 ![cloudfunctions-example-customimages_04.png](https://cdn.document360.io/0406ed95-101f-4cde-8dd8-308d03444a94/Images/Documentation/cloudfunctions-example-customimage_04_kr.png) ### Container Registry 이미지 경로 입력 사용할 이미지의 경로를 직접 입력할 수 있습니다. 이미지 경로는 형식은 '<레지스트리>/<이미지>:<태그>'입니다. 태그 생략 시, latest가 자동 입력됩니다. ### 경로 검증 입력한 경로의 이미지가 사용 가능한지 검증합니다. 검증 조건은 아래와 같습니다. - 이미지의 압축 크기 800MB 이하 - Cloud Functions에서 제공하는 [Base 이미지](/docs/cloudfunctions-example-customimage#%EB%9F%B0%ED%83%80%EC%9E%84%EB%B3%84-Base-%EC%9D%B4%EB%AF%B8%EC%A7%80) 사용 ## 이미지 Packs Cloud Functions에서는 아래와 같은 특화된 이미지를 제공하며 Custom Image 런타임에서 사용할 수 있습니다. 제공되는 이미지는 Base 이미지로도 사용할 수 있습니다. | 이미지 | 설명 | 경로 | Base 런타임 | | --- | --- | --- | --- | | Headless Chrome Puppeteer | [Headless Chrome](https://developer.chrome.com/blog/headless-chrome/), [Puppeteer](https://pptr.dev/)을 사용할 수 있는 Node.js 환경을 제공합니다. | cloudfunctions.ncr.fin-ntruss.com/headless-chrome-puppeteer:[TAG] | nodejs:16 |