{
  "id": "devops/docker-build",
  "family": "container-build",
  "description": "Compact docker build output while preserving real failures and final stages.",
  "match": {
    "toolNames": ["exec"],
    "argv0": ["docker"],
    "argvIncludes": [["build"]]
  },
  "transforms": {
    "stripAnsi": true,
    "dedupeAdjacent": true,
    "trimEmptyEdges": true
  },
  "filters": {
    "skipPatterns": [
      "^#\\d+\\s+[0-9.]+\\s",
      "^#\\d+\\s+extracting\\s",
      "^#\\d+\\s+sha256:"
    ],
    "keepPatterns": [
      "^#\\d+\\s+\\[",
      "^#\\d+\\s+DONE\\s",
      "^#\\d+\\s+ERROR:",
      "^ERROR:",
      "^ => ",
      "^exporting to image$",
      "^writing image",
      "^naming to "
    ]
  },
  "summarize": {
    "head": 10,
    "tail": 8
  },
  "failure": {
    "preserveOnFailure": true,
    "head": 14,
    "tail": 14
  },
  "counters": [
    {
      "name": "step",
      "pattern": "^#\\d+\\s+\\[",
      "flags": "m"
    },
    {
      "name": "error",
      "pattern": "error",
      "flags": "i"
    }
  ]
}
