Skip to Content
We are live but in Staging 🎉
WorkflowsWorkflow: Build a Custom Image and Use It

Workflow: Build a Custom Image and Use It

Last validated: 2026-05-20

Goal

Create and monitor a remote build, then use the resulting image in app draft flow (API fallback for image-mode draft).

What BYOI Supports

BYOI (code.image) is for running your own container contract while keeping Ignite lifecycle and invocation control.

Typical use cases:

  • Lift-and-shift existing containerized services
  • Use custom runtime stacks and native dependencies
  • Keep framework-specific startup behavior (FastAPI/Flask/Node/Go HTTP servers, etc.)
  • Use private registries through SecretService-backed pull credentials
  • Run multi-port services via app ports metadata

Important expectations:

  • Container must expose the app endpoint expected by your invocation path.
  • Health endpoint should be aligned with configured health_path.
  • Image mode is selected through SaveDraft.code.image (not code.compile).

Inputs

  • Build context directory or git repository
  • Org token and endpoint
  • Target app name

Build Flow (CLI)

# 1) Optional: upload large build context dodil ignite build upload --folder ./my-app --name my-app # 2) Start build from uploaded context dodil ignite build create my-app --context-id <context_id> --tag latest # 3) Stream logs dodil ignite build logs <build_id> # 4) Poll status dodil ignite build get <build_id>

Alternative source modes:

  • --git-url, --git-ref, --git-dir for git-based build
  • inline context (--context) for smaller projects

Use Built Image in Draft (API Fallback)

Current CLI draft save focuses on compile-source path. For image-mode draft, call API directly.

export IGNITE_GRPC=api.dev.dodil.io:443 export TOKEN=<bearer_token> export ORG=my-org export APP=my-app export IMAGE_REF=admin-registry.dev.dodil.io/my-org/my-app:latest grpcurl -H "authorization: Bearer ${TOKEN}" \ -d '{ "organization_name":"'"${ORG}"'", "app_name":"'"${APP}"'", "code":{ "image":{ "prebuilt":{ "image_ref":"'"${IMAGE_REF}"'" } } } }' \ ${IGNITE_GRPC} dodil.ignite.v1.ComputeService/SaveDraft

BYOI prebuilt image from private registry

grpcurl -H "authorization: Bearer ${TOKEN}" \ -d '{ "organization_name":"'"${ORG}"'", "app_name":"'"${APP}"'", "code":{ "image":{ "prebuilt":{ "image_ref":"ghcr.io/acme/private-app:1.2.3", "registry_secret_ref":"ghcr-creds" } } } }' \ ${IGNITE_GRPC} dodil.ignite.v1.ComputeService/SaveDraft

Build image from code archive (Kaniko or Buildpacks)

grpcurl -H "authorization: Bearer ${TOKEN}" \ -d '{ "organization_name":"'"${ORG}"'", "app_name":"'"${APP}"'", "code":{ "image":{ "from_code":{ "archive":"<base64_zip_or_targz>", "dockerfile_path":"Dockerfile" } } } }' \ ${IGNITE_GRPC} dodil.ignite.v1.ComputeService/SaveDraft

Build image from git source

grpcurl -H "authorization: Bearer ${TOKEN}" \ -d '{ "organization_name":"'"${ORG}"'", "app_name":"'"${APP}"'", "code":{ "image":{ "from_git":{ "url":"https://github.com/acme/my-app.git", "reference":"main", "sub_path":"services/infer", "dockerfile_path":"Dockerfile", "secret_ref":"github-pat" } } } }' \ ${IGNITE_GRPC} dodil.ignite.v1.ComputeService/SaveDraft

After image-mode draft save:

  1. Test draft (TestDraft)
  2. Publish draft (PublishDraft)
  3. Invoke app (Invoke)

Notes

  1. BuildService and draft image-mode are separate surfaces; bridge them explicitly in automation.
  2. If image is in private registry, use registry_secret_ref with SecretService-managed credentials.
  3. BYOI still uses standard Ignite publish/invoke/observe APIs once a draft is published.