# Docker/Podman Composer

> Convert docker run and podman run commands into a Compose file and back — entirely in the browser. Your starting point for the manual, examples, and tips.

Source: https://www.jpkc.com/db/en/tools/docker/

## From a long run command to a Compose file — and back

The [Docker/Podman Composer](https://www.jpkc.com/tools/docker/) translates between two ways of describing the same container: the single-line (often very long) `docker run` or `podman run` command, and the structured `docker-compose.yml`. And it works in **both directions** — enter a run command and get the matching Compose YAML, or paste a Compose file and get a ready-to-use run command for each service.

That solves an everyday annoyance: a `docker run` with a dozen flags is hard to read, hard to version, and hard to maintain. A Compose file is none of those. Conversely, plenty of docs, issues, and tutorials hand you a `run` one-liner that you want to slot into your existing `docker-compose.yml`. The Composer saves you the retyping and the lookups.

The tool is built for everyone who works with containers: **developers** who want to move a run command copied from a tutorial into their Compose setup; **DevOps and ops people** documenting ad-hoc containers after the fact as a Compose service; and anyone who quickly needs the `run` equivalent of a Compose service to test a single container by hand.

## What the tool does — at a glance

The interface is in English and split into three tabs:

- **Run → Compose** — enter a `docker run`/`podman run` command, click **Convert to YAML**, get a `docker-compose.yml`. The YAML output is **editable** (an "editable" badge) and can be copied or downloaded straight as `docker-compose.yml`.
- **Compose → Run** — enter Compose YAML, click **Convert to Commands**, get a ready-made run command per service. A radio switch picks whether the commands are generated for **docker** or **podman**.
- **Reference** — a built-in "Flag Reference: docker run → Compose" table, a list of Compose-only features, an overview of restart policies, and a few tips. A lookup sheet right inside the tool.

Both converter editors are built on the ACE editor with syntax highlighting for shell and YAML. Each input field has an **Example** button (loads a sample) and a **Clear** button (empties the fields).

## Fully client-side — nothing leaves your browser

Important for privacy and understanding: the Composer runs **entirely in your browser**. The whole conversion pipeline — command-line tokenizer, flag parser, YAML serializer, and the YAML parser for the reverse direction — is local JavaScript. There is **no server fetch, no API, and no upload**: neither your run command nor your Compose file is sent anywhere. So you can safely use the tool with commands that contain passwords, tokens, or internal hostnames. Even the `docker-compose.yml` download is produced locally as a file blob.

## Try it now

**[→ Open the Docker/Podman Composer](https://www.jpkc.com/tools/docker/)** — paste a run command or Compose YAML, convert, copy or download the result. No account, free, right in the browser. If you'd like to see what it looks like first, the **Example** button in each tab loads a ready-made sample (an nginx container with ports, volumes, env, health check, and logging).

## Related JPKCom tools

- **[Docker cheat sheet](https://www.jpkc.com/db/en/cheatsheets/containers/docker/)** — the key `docker` commands and flags to look up when you build a run command by hand.
- **[Docker Compose cheat sheet](https://www.jpkc.com/db/en/cheatsheets/containers/docker-compose/)** — the structure and commands of `docker compose`, the perfect companion for the generated YAML.
- **[Podman cheat sheet](https://www.jpkc.com/db/en/cheatsheets/containers/podman/)** — the `podman` equivalents, in case you generate commands for Podman.
- **[Cron generator](https://www.jpkc.com/db/en/tools/cron/)** — build crontab lines, for example to schedule a recurring container job.

---

There's more on the subpages: the **[manual](https://www.jpkc.com/db/en/tools/docker/manual/)** with both conversion directions and every supported flag, hands-on **[examples](https://www.jpkc.com/db/en/tools/docker/examples/)**, and a collection of **[tips & tricks](https://www.jpkc.com/db/en/tools/docker/tips/)**.

