{
  "id": "cicd/bitbucket-pipeline-service-unavailable",
  "signature": "Error: Service 'docker' is unavailable. Please check that the service is running and accessible.",
  "signature_zh": "错误：服务 'docker' 不可用。请检查服务是否正在运行且可访问。",
  "regex": "Service.*is unavailable",
  "domain": "cicd",
  "category": "system_error",
  "subcategory": null,
  "root_cause": "Bitbucket Pipelines cannot start the Docker service because the pipeline's build container lacks Docker daemon access or the service definition in bitbucket-pipelines.yml is misconfigured.",
  "root_cause_type": "generic",
  "root_cause_zh": "Bitbucket Pipelines无法启动Docker服务，因为管道的构建容器没有Docker守护进程访问权限，或者bitbucket-pipelines.yml中的服务定义配置错误。",
  "versions": [
    {
      "version": "Bitbucket Pipelines 2024",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Docker 24.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Ubuntu 22.04",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Add 'docker: true' to the step definition without defining services",
      "why_fails": "Docker service must be explicitly listed under 'services:' in the pipeline YAML",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "Use a custom Docker image without checking if it has Docker installed",
      "why_fails": "The service requires Docker daemon, which may not be present in custom images",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "Set DOCKER_HOST environment variable to a remote daemon",
      "why_fails": "Bitbucket Pipelines blocks external network connections from services for security",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Add the Docker service to bitbucket-pipelines.yml:\ndefinitions:\n  services:\n    docker:\n      image: docker:24.0\npipelines:\n  default:\n    - step:\n        services:\n          - docker\n        script:\n          - docker info",
      "success_rate": 0.85,
      "how": "Add the Docker service to bitbucket-pipelines.yml:\ndefinitions:\n  services:\n    docker:\n      image: docker:24.0\npipelines:\n  default:\n    - step:\n        services:\n          - docker\n        script:\n          - docker info",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use a Bitbucket pipeline image that includes Docker pre-installed, such as atlassian/default-image:4",
      "success_rate": 0.75,
      "how": "Use a Bitbucket pipeline image that includes Docker pre-installed, such as atlassian/default-image:4",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Add the Docker service to bitbucket-pipelines.yml:\ndefinitions:\n  services:\n    docker:\n      image: docker:24.0\npipelines:\n  default:\n    - step:\n        services:\n          - docker\n        script:\n          - docker info",
    "Use a Bitbucket pipeline image that includes Docker pre-installed, such as atlassian/default-image:4"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://support.atlassian.com/bitbucket-cloud/docs/configure-bitbucket-pipelinesyml/",
  "official_doc_section": null,
  "error_code": "SERVICE_UNAVAILABLE",
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-01-20",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}