---
title: "Analyze Docker Image Endpoint"
method: POST
path: "/api/v1/analysis/docker-image"
tags: ["analysis"]
---

# Analyze Docker Image Endpoint

`POST /api/v1/analysis/docker-image`

## Request

- Base URL: `https://api.mengi.cloud` (the document declares no server; this is the origin it was published from)
- URL: `https://api.mengi.cloud/api/v1/analysis/docker-image`
- Auth: none declared

Analyze a Docker image reference to extract:
- Image information
- Suggested ports and volumes
- Required environment variables
- Backing services (databases, caches, etc.)
- 12-factor app compliance analysis
- Deployment recommendations

## Request body

- DockerImageAnalysisRequest
  - `image_reference` string, required

## Response `200`

Successful Response

- DockerImageAnalysisResponse
  - `analysis` DockerImageAnalysis, required
    - `image_info` ImageInfo
      - `reference` string, required
      - `is_official` boolean
      - `description` string, nullable
    - `ports` PortInfo[]
      - `port` integer, required
      - `protocol` string
      - `description` string, nullable
    - `volumes` VolumeInfo[]
      - `path` string, required
      - `purpose` string, nullable
      - `required` boolean
    - `environment_variables` EnvVarInfo[]
      - `name` string, required
      - `required` boolean
      - `description` string, nullable
      - `default_value` string, nullable
      - `source` string, nullable
    - `backing_services` BackingServiceInfo[]
      - `type` string, required
      - `detected_from` string, nullable
    - `twelve_factor` TwelveFactorAnalysis
      - `compliant` boolean, nullable
      - `score` integer, nullable
      - `findings` TwelveFactorFinding[]
        - `factor` string, required
        - `status` string, required
        - `note` string, nullable
    - `healthcheck` HealthcheckInfo
      - `endpoint` string, nullable
      - `suggested` boolean
    - `suggestions` string[]
    - `deployment_recommendations` DeploymentRecommendations
      - `replicas` integer
      - `resources` ResourceRequirements
        - `requests` ResourceSpec, required
          - `cpu` string, required
          - `memory` string, required
        - `limits` ResourceSpec, required
          - `cpu` string, required
          - `memory` string, required
  - `suggested_services` SuggestedService[]
    - `id` string, required
    - `name` string, required
    - `type` string, required
    - `detected_from` string, required
  - `service_recommendations` ServiceRecommendation[]
    - `service_type` string, required
    - `service_name` string, required
    - `detected_from` string, required
    - `helm_chart` HelmChartOption, required
      - `name` string, required
      - `repository` string, required
      - `description` string, required
  - `usage` object, required
  - `metadata_source` string, required
  - `dotenv_files` string[]
  - `dotenv_scan_complete` boolean
  - `image_exists` boolean, nullable
  - `warning` string, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/mengi/apis/mengi-cloud.md) · [All operations](https://skmtc.dev/mengi/apis/mengi-cloud/llms.txt) · [OpenAPI document](https://skmtc.dev/mengi/apis/mengi-cloud/revisions/4ae9b375cdbb?raw)
