{
  "name": "docker-build-push",
  "title": "Build and push a container image",
  "description": "Build a container image from a Dockerfile with BuildKit and push it to a registry, using a Docker config.json read from a Kubernetes Secret.",
  "category": "CI/CD",
  "tags": [
    "buildkit",
    "ci-cd"
  ],
  "latestVersion": "2.0.0",
  "versions": [
    "2.0.0",
    "1.0.1",
    "1.0.0"
  ],
  "parameters": [
    "context",
    "destination",
    "docker-config-secret-key",
    "docker-config-secret-name",
    "dockerfile",
    "push"
  ],
  "images": [
    "moby/buildkit@sha256:f68752a5a94acfcdad2d07867b7075601a421638e17fc5f28efc1c814d0c4f89"
  ],
  "url": "https://catalog.dagweave.com/api/v1/items/docker-build-push.json",
  "templateUrl": "https://catalog.dagweave.com/api/v1/items/docker-build-push/latest/template.yaml",
  "page": "https://catalog.dagweave.com/items/docker-build-push/",
  "entrypoint": "build",
  "parameterDetails": [
    {
      "name": "context",
      "title": "Build context",
      "description": "A directory BuildKit can read, or a git/HTTP URL it can fetch. A git URL carries its branch and subdirectory as a #ref:subdir fragment.",
      "type": "string",
      "required": true,
      "example": "/work"
    },
    {
      "name": "destination",
      "title": "Destination image",
      "description": "Fully-qualified destination image reference to push (registry/repo:tag).",
      "type": "string",
      "required": true,
      "example": "ghcr.io/org/app:1.2.3"
    },
    {
      "name": "docker-config-secret-key",
      "title": "Docker config secret key",
      "description": "Key within the Secret that holds the Docker config.json.",
      "type": "string",
      "required": false,
      "default": ".dockerconfigjson"
    },
    {
      "name": "docker-config-secret-name",
      "title": "Docker config secret name",
      "description": "Name of the Kubernetes Secret holding the registry Docker config.json.",
      "type": "string",
      "required": false,
      "default": "docker-config"
    },
    {
      "name": "dockerfile",
      "title": "Dockerfile",
      "description": "Path to the Dockerfile, relative to the context root.",
      "type": "string",
      "required": false,
      "default": "Dockerfile"
    },
    {
      "name": "push",
      "title": "Push",
      "description": "Set to false to build the image and keep it in the builder without pushing it anywhere.",
      "type": "string",
      "required": false,
      "default": "true",
      "enum": [
        "true",
        "false"
      ]
    }
  ],
  "imageDetails": [
    {
      "ref": "moby/buildkit@sha256:f68752a5a94acfcdad2d07867b7075601a421638e17fc5f28efc1c814d0c4f89",
      "repository": "moby/buildkit",
      "tag": "v0.34.1-rootless",
      "digest": "sha256:f68752a5a94acfcdad2d07867b7075601a421638e17fc5f28efc1c814d0c4f89"
    }
  ],
  "versionDetails": [
    {
      "version": "2.0.0",
      "date": "2026-08-06",
      "notes": "Replace Kaniko with rootless BuildKit. Google archived kaniko, so its 112 fixable CRITICAL/HIGH (5 CRITICAL) could never come down; BuildKit v0.32.2 measures 64, none CRITICAL, and ships often enough for that to move. Breaking on three counts, hence the major. A context is now a directory or a git/HTTP URL, so kaniko's s3://, gs:// and dir:// contexts are gone and its git:// prefix now means the git wire protocol rather than \"clone over HTTPS\"; a git subdirectory rides in the URL fragment as `#ref:subdir` where kaniko took a separate --context-sub-path. The container needs Unconfined seccomp and AppArmor to unshare a user namespace, which kaniko did not, so it will not admit into a namespace enforcing PodSecurity `restricted`. New `push` parameter, default \"true\", standing in for kaniko's --no-push.",
      "latest": true,
      "installable": true,
      "url": "https://catalog.dagweave.com/api/v1/items/docker-build-push/2.0.0.json",
      "templateUrl": "https://catalog.dagweave.com/api/v1/items/docker-build-push/2.0.0/template.yaml"
    },
    {
      "version": "1.0.1",
      "date": "2026-08-02",
      "notes": "Move kaniko from v1.23.2 to v1.24.0, the newest release. Fixable CRITICAL/HIGH only drops from 116 to 112: kaniko has shipped nothing since May 2025, so clearing the rest needs a different build tool rather than another bump.",
      "latest": false,
      "installable": false,
      "url": "https://catalog.dagweave.com/api/v1/items/docker-build-push/1.0.1.json"
    },
    {
      "version": "1.0.0",
      "date": "2026-07-17",
      "notes": "Initial release.",
      "latest": false,
      "installable": false,
      "url": "https://catalog.dagweave.com/api/v1/items/docker-build-push/1.0.0.json"
    }
  ],
  "source": "https://github.com/dagweave/catalog/tree/67458f74dbbf913b03177f3cefc69424be85eb1d/catalog/docker-build-push",
  "catalogSha": "67458f74dbbf913b03177f3cefc69424be85eb1d"
}
