# Docker Run to Compose Guide

Turn a docker run command into a docker-compose service.

- Tool: https://ilham.dev/tools/docker-run-to-compose/
- Guide URL: https://ilham.dev/guides/docker-run-to-compose/
- Tool guides index: https://ilham.dev/guides/tools/
- Broader guide: Docker Basics (https://ilham.dev/guides/docker-basics/)

## What it does

Turn a docker run command into a docker-compose.yml service, mapping ports, volumes, environment variables, restart policy and the command into their Compose equivalents.

## Use the tool

Open https://ilham.dev/tools/docker-run-to-compose/, add the input the tool asks for, run it, and check the output before using it elsewhere.

## Input and output

- Input: text.
- Output: text.
- Category: Workflow.

## Privacy and processing
Processing happens locally in your browser. This tool does not upload the input to ilham.dev.

## Questions

### Does it understand every flag?

It covers the common ones — ports, volumes, environment, restart, network, command and entrypoint. Anything it does not recognise is reported rather than silently dropped.