Why bother converting
docker run is fine for a quick try. Compose is easier to diff in git and share with the team. Hand-copying flags into YAML is how -e values and weird quoting disappear.
The Docker Run → Compose tool parses the CLI in your browser and spits out a services block. You don’t need Docker installed just to preview.
Steps that usually work
Copy the full docker run (backslash continuations are fine). Paste it. Check image, ports, volumes, environment. Save as docker-compose.yml, then run docker compose config on your machine once.
If the command had passwords or tokens, rotate them after. Don’t commit real secrets.
What breaks
PowerShell and bash quote differently — paste a bash-style string when you can. Keep -p, -v, and -e pairs intact. One docker run is one service; convert each container, then merge YAML if you need a stack.
JSON↔YAML or Text Diff on the site helps when indentation looks cursed after a second pass.