--- title: "Custom Image" slug: "cloudfunctions-example-customimage" updated: 2026-09-17T09:31:52Z published: 2026-09-17T09:31:52Z canonical: "guide.ncloud-docs.com/cloudfunctions-example-customimage" --- > ## Documentation Index > Fetch the complete documentation index at: https://guide.ncloud-docs.com/llms.txt > Use this file to discover all available pages before exploring further. # Custom Image VPC環境で利用できます。 ユーザーイメージベースでアクションを作成し、実行できます。基本提供されるランタイムでライブラリとイメージレイヤーを追加でき、複数のアクションで共通して使用する設定を共通イメージに構成して使用できます。 参考 - イメージ Pull時間はアクション実行時間に含まれません。 - Custom Imageのランタイムは VPCプラットフォームのみサポートします。 - 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.kr.ncr.ntruss.com/cloudfunctions-python-3.7:[TAG] | / | ["/bin/proxy"] | - | Rocky Linux 8.7 | | nodejs:16 | cloudfunctions.kr.ncr.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.ncloud.com/product/containers/containerRegistry)にイメージを Pushします。 イメージは Container Registryパスを含む必要があります。 ### イメージ Build ``` docker build . -t <イメージ> ``` ### イメージ Push Container Registryにイメージを Pushするには Container Registryにログインします。詳細は、[Container Registry ご利用ガイド](/docs/ja/container-ncr-1-3#%EB%8F%84%EC%BB%A4-%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)をご参照ください。 ``` docker login -u <レジストリ名>.<リージョン>.ncr.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.kr.ncr.ntruss.com/custom-python:1.0.0 ``` - Push ``` docker login -u *** my-registry.kr.ncr.ntruss.com password: **** docker push my-registry.kr.ncr.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/6998976f-9d95-4df8-b847-d375892b92c2/Images/Documentation/cloudfunctions-example-customimage_v2_01_ja.png?sv=2026-02-06&spr=https&st=2026-10-30T17%3A49%3A11Z&se=2026-10-30T18%3A49%3A11Z&sr=c&sp=r&sig=86cEMGA%2FJK1OM3HoAJ3pH5YbXbk7QYpDAatQI9dr3r0%3D) ### Container Registryイメージ選択 次の手順に従って使用するイメージを選択します。 **[完了]** ボタンをクリックすると、使用可否を自動で検証し、圧縮サイズが 800MBを超えるイメージは使用できません。 - レジストリ選択 ![cloudfunctions-example-customimages_02.png](https://cdn.document360.io/6998976f-9d95-4df8-b847-d375892b92c2/Images/Documentation/cloudfunctions-example-customimage_02_ja.png?sv=2026-02-06&spr=https&st=2026-10-30T17%3A49%3A11Z&se=2026-10-30T18%3A49%3A11Z&sr=c&sp=r&sig=86cEMGA%2FJK1OM3HoAJ3pH5YbXbk7QYpDAatQI9dr3r0%3D) - イメージ選択 ![cloudfunctions-example-customimages_03.png](https://cdn.document360.io/6998976f-9d95-4df8-b847-d375892b92c2/Images/Documentation/cloudfunctions-example-customimage_03_ja.png?sv=2026-02-06&spr=https&st=2026-10-30T17%3A49%3A11Z&se=2026-10-30T18%3A49%3A11Z&sr=c&sp=r&sig=86cEMGA%2FJK1OM3HoAJ3pH5YbXbk7QYpDAatQI9dr3r0%3D) - タグ選択 ![cloudfunctions-example-customimages_04.png](https://cdn.document360.io/6998976f-9d95-4df8-b847-d375892b92c2/Images/Documentation/cloudfunctions-example-customimage_04_ja.png?sv=2026-02-06&spr=https&st=2026-10-30T17%3A49%3A11Z&se=2026-10-30T18%3A49%3A11Z&sr=c&sp=r&sig=86cEMGA%2FJK1OM3HoAJ3pH5YbXbk7QYpDAatQI9dr3r0%3D) ### Container Registryイメージパス入力 使用するイメージのパスを直接入力できます。イメージパスの形式は 「<レジストリ>/<イメージ>:<タグ>」です。タグを省略すると、latestが自動入力されます。 ### パス検証 入力したパスのイメージの使用可否を検証します。検証条件は次の通りです。 - イメージの圧縮サイズ800MB以下 - Cloud Functionsで提供する [Baseイメージ](/docs/ja/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.kr.ncr.ntruss.com/headless-chrome-puppeteer:[TAG] シンガポール: cloudfunctions.sg.ncr.ntruss.com/headless-chrome-puppeteer:[TAG] 日本: cloudfunctions.jpn.ncr.naverncp.com/headless-chrome-puppeteer:[TAG] | nodejs:16 |