Skip to content
Utilerio
All endpoints

docker run to Compose

POST/api/v1/tools/docker-run-to-compose

Paste a docker run command and get the equivalent docker-compose.yml service.

Authentication

Requires an API key in the X-API-Key header.

Try it

POST/api/v1/tools/docker-run-to-compose

Parameters

commandstringrequired

A `docker run ...` command to convert.

Request body

{
  "command": "docker run -d --name web -p 8080:80 -e NODE_ENV=production -v ./data:/app/data nginx:latest"
}

Response codes

  • 200Success.
  • 400Invalid request — check your body or parameters.
  • 401Missing or invalid API key.
  • 403The API key is not scoped to this endpoint.
  • 429Rate limit exceeded — retry after a short wait.

Language

cURL

Request

curl -X POST https://utilerio.com/api/v1/tools/docker-run-to-compose \
  -H "X-API-Key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"command":"docker run -d --name web -p 8080:80 -e NODE_ENV=production -v ./data:/app/data nginx:latest"}'

Response

{ "yaml": "services:\n  web:\n    image: nginx:latest\n    ...", "serviceName": "web", "ignoredFlags": [] }