{
  "slug": "dagger-container-from-and-container-publish-support-registryservice-9a5e9c25b697",
  "title": "dagger Container.from and Container.publish support registryService",
  "tools": [
    "dagger"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-06-11T20:27:31.000Z",
  "announced_at": "2026-06-11T20:27:31.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When using a Dagger Service as the image registry, pass it as `RegistryService` to `Container.From` or `Container.Publish`. This selects that service for the registry operation without starting unrelated services attached to the container.",
    "examples": [
      "_, err := dag.Container().WithNewFile(\"/hello.txt\", \"hello\").Publish(ctx, \"<registry-host>:5000/<image>:<tag>\", dagger.ContainerPublishOpts{RegistryService: registry})",
      "container := dag.Container().From(\"<registry-host>:5000/<image>:<tag>\", dagger.ContainerFromOpts{RegistryService: registry})"
    ],
    "gotchas": [
      "Version: v0.21.6",
      "address (required): Image reference used for the pull or push; its registry hostname must match the Service binding alias.",
      "registryService: The Dagger Service used as the registry endpoint; only this service is started for the pull or push. It is an option on both `Container.from` and `Container.publish`.",
      "Prerequisite: Use Dagger v0.21.6 or later for the `registryService` options.",
      "Prerequisite: Provide a Dagger Service for the registry and use an image reference whose registry hostname matches the service binding alias."
    ]
  },
  "why_it_matters": "Use a Dagger Service as the registry when pulling a container image or publishing one to a local ephemeral registry.",
  "before": "Before the explicit option, the implementation used services attached to the container for registry operations, which could start unrelated attached services.",
  "sources": [
    "https://github.com/dagger/dagger/releases/tag/v0.21.6",
    "https://github.com/dagger/dagger/pull/13305/files",
    "https://github.com/dagger/dagger/pull/13305"
  ],
  "rank": 0.96029,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v2+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "wave2a-20261017",
    "verdict_id": "wave2a-20261017:wave2a-20261017-0592cfa44c9550be-0:gate",
    "evidence_hash": "4841c4444594e2c6c13e60a12ae147c5e7d8c4614002f35b4501a5382bdd1d08"
  },
  "review": {
    "draft_hash": "ff6d38d74a33faac202aee8ba70e93ba853438dacaac3be1320fe37b8d43ae24",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "wave2a-20261017:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.96 >= 0.9; 2 needed) and Jev gave 0.72 (>= 0.6 needed)."
  }
}
