Composerize and runlike with Docker: Turn docker run into a Compose File, and a Running Container Back into a Command (Linux, Windows, Mac)
Before you start
- 24 min read
Boxes marked Run in terminal are what you type; plain text explains why. Check what you need first

What you get in one minute#
Composerize turns docker run into Compose; runlike recovers the command for a running container. Both print text for us to review before running it.

Logo: the official Composerize project (github.com/composerize, the avatar of the project's own GitHub organisation, MIT). The repository has no separate logo file.

Logo: the official runlike project (lavie/runlike, docs/assets/og.png, BSD-2-Clause). The project has no logo file, so this is the preview image of its own website, shown unchanged as a stand-in.
These tools recover forgotten commands and convert them to Compose. Neither changes a container.
| What | Value (official sources, read 5 December 2026) |
|---|---|
| Composerize | 1.7.6, published on npm 17 May 2026 (MIT) |
| runlike | 2.0.0, released 6 November 2026, a rewrite in Go (BSD-2-Clause, see the licence note) |
| Image to pin | assaflavie/runlike:2.0.0 (checked on Docker Hub: linux/amd64 and linux/arm64, about 69 MB for amd64) |
| Decomposerize (reverse tool) | 1.4.4, 5 January 2025 (MIT) |
| Example images | alpine:3.25; database conversion stays on postgres:17.12-alpine3.24 (checked 5 December 2026) |
| Time needed | About 30 minutes (our estimate, not measured) |
| RAM / ports | No official figure; none of the tools listens on a port |
| Official docs | Composerize README, runlike README |
At a glance:
- Composerize: a command-line tool (needs Node.js) and a web page, composerize.com. It reads text, so it knows only what you give it.
- runlike: reads a container's stored settings with
docker inspectand prints thedocker runline that would recreate it. - The chain: container, then runlike, then a
docker runline, then Composerize, then a draftcompose.yaml, then you. - Treat the output as secret: passwords in environment variables are printed in clear text.
- Not included: no data copy and no backup. Our docker-volume-backup guide covers data.
Which version. runlike changed a month ago. The old Python package is frozen (PyPI stops at 1.5.4), and 2.0.0 is a new Go program with the same command line. Its README says AI coding agents write it and a human approves each release. It only reads and prints, so we use it, but we read every line. For Composerize the GitHub "Releases" page still shows v1.4.1 from October 2023, while npm carries 1.7.6 (also tag v1.7.6), so we pin that. Licence note: PyPI labels runlike MIT, but the LICENSE.txt in the repository holds BSD two-clause terms (copyright Assaf Lavie). We follow the repository file.
How it fits together#
runlike prints a container's command; Composerize converts it to a draft for us to review.
Drawn for this guide from the official READMEs and the Composerize source at v1.7.6.
Two words: a named volume is Docker-managed storage such as data:/data, and external means "it already exists, Compose must not create it".
Before you start#
Note: every password, name and value on this page is a dummy example (like
change-meandnotes-db). Replace it with your own and never paste real secrets into a website.
| System | What to have |
|---|---|
| Linux | Docker Engine, the Compose plugin, Node.js with npm for Composerize |
| Windows | Windows 10 or later, Docker Desktop (Linux containers), PowerShell 7.3 or later, Node.js with npm |
| Mac | Docker Desktop (Intel or Apple Silicon), Node.js with npm |
docker --version docker compose version node --version npm --version
Checklist:
- [ ] All four commands print a version (get Node.js from nodejs.org if the last two fail)
- [ ] You have a running container to try runlike on, or you use our demo in Step 5
- [ ] You know where your real secrets live (a password manager); we never paste them into a converter
Tested by DIY Lab Hub: not yet. Linux = not run, Windows = not run, Mac = not run. Commands and options come from the READMEs, the Composerize source and tests at v1.7.6, and the runlike 2.0.0 release, read on 5 December 2026. The Composerize output below is built from the project's own tests; the runlike output is quoted from its README. We say so wherever it matters.
Docker Desktop. Docker's FAQ says Mac and Windows WSL 2 users reach the engine at unix:///var/run/docker.sock, the path the runlike image expects. We have not run it there. The runlike download for macOS is for Apple Silicon only; the Docker image works on Intel too. Windows PowerShell 5.1 > can write UTF-16, so we use Set-Content -Encoding ascii.
LLM Guide: let your AI assistant set it up#
Prefer to let an AI do the typing? Copy the block below into ChatGPT, Claude, Gemini or a local model. It first asks about your setup, then follows only the path that fits you.
You are my assistant for converting docker run commands with Composerize 1.7.6 and reading containers with runlike 2.0.0.
Follow https://diylabhub.com/composerize-runlike/ (checked 5 December 2026).
Work one step at a time. Explain each command before running it. Wait for my OK before deleting data, stopping services, changing the router or opening ports. Converting text must not start a database or replace a running app.
STEP 0 - FIND OUT MY SETUP:
1. Linux (which distribution), Windows PowerShell 7.3 or later, or Mac? Check docker --version, docker compose version, node --version and npm --version.
2. Do I have a docker run line, an existing container to inspect, or do I want the Alpine demo?
3. Which existing volumes and networks hold data? Are they backed up? Which names, ports and image versions must stay the same?
4. Is socket access acceptable, or should we use docker inspect piped to runlike --stdin? Both outputs may hold passwords; never paste them into chat or a website.
5. Does the converted app have a web page? If so, is it local HTTP, existing Traefik, or Caddy HTTPS with a public domain or home-only certificate? The converter tools need no web port.
THEN FOLLOW THE MATCHING PATH:
- If Linux or Mac: mkdir -p ~/docker_volumes/convert/{work,backups}, chmod 700 ~/docker_volumes/convert, then cd ~/docker_volumes/convert/work. Mac zsh keeps aliases in ~/.zshrc.
- If Windows: create work and backups under $HOME\docker_volumes\convert using New-Item, then Set-Location into work. Use Set-Content -Encoding ascii for output files; PowerShell 5.1 redirection may write UTF-16.
- If a run line exists: pass it as arguments or one quoted string to composerize, then save and read the draft. Do not pipe a run command to composerize: standard input means an existing Compose file to merge.
- If a container exists: runlike web > web.run.txt, read it, then composerize "$(cat web.run.txt)" > web.draft.yaml on Linux/Mac. On Windows use composerize (Get-Content web.run.txt -Raw) | Set-Content -Encoding ascii web.draft.yaml. For executing a printed command in PowerShell use runlike --shell powershell; conversion keeps its default shell output.
- If database conversion: keep postgres:17.12-alpine3.24 and the existing data path and volume. The guide only converts text; it does not migrate PostgreSQL. Never swap an existing database to 19. A later major upgrade needs app support and dump/restore.
- If no socket mount: docker inspect web | docker run --rm -i assaflavie/runlike:2.0.0 --stdin. This omits image data and may print more defaults.
- If a converted web app uses Traefik: remove its ports, join external proxy (docker network create proxy if missing), and use traefik.enable=true, traefik.http.routers.notes.rule=Host(`notes.example.com`), traefik.http.routers.notes.entrypoints=https, traefik.http.routers.notes.tls=true, traefik.http.routers.notes.tls.certresolver=le and traefik.http.services.notes.loadbalancer.server.port=80.
- If Caddy: notes.example.com { reverse_proxy localhost:8080 }. Public HTTPS needs DNS and ports 80/443. Home only adds tls internal; trust Caddy's root on each computer as the guide explains. Check curl -I https://notes.example.com.
INSTALL:
npm install -g [email protected]
composerize --help
Linux/Mac: alias runlike='docker run --rm -v /var/run/docker.sock:/var/run/docker.sock assaflavie/runlike:2.0.0'
Windows: function Invoke-Runlike { docker run --rm -v /var/run/docker.sock:/var/run/docker.sock assaflavie/runlike:2.0.0 @args }; Set-Alias runlike Invoke-Runlike
runlike --help
The guide also documents runlike binaries and Homebrew. PyPI stays at old 1.5.4; do not suggest pip as the 2.0.0 install.
DEMO ONLY, after approval to open port 8080:
docker network create appnet
docker run -d --name web --restart=unless-stopped -p 8080:80 -e 'GREETING=hello world' -v data:/data --network appnet --network-alias web --memory 256m --label app=demo alpine:3.25 sleep 3600
This sleep container is a conversion example, not a web server. Read its runlike output and draft; compare them with Step 5.
REVIEWED DEMO COMPOSE (~/docker_volumes/web/compose.yaml):
name: web
services:
web:
image: alpine:3.25
container_name: web
command: sleep 3600
restart: unless-stopped
ports:
- "8080:80"
environment:
GREETING: "hello world"
volumes:
- data:/data
networks:
appnet:
aliases:
- web
mem_limit: 256m
labels:
app: demo
networks:
appnet:
external: true
volumes:
data:
external: true
CHECK IT WORKED:
Read every draft. Replace name: <your project name>. Keep external: true for existing volumes/networks; remove it for new ones. Put real passwords in local .env, chmod 600, and use ${DB_PASSWORD}. Validate with docker compose config -q: no output means valid. Only after approval, stop web, rename it web-old, then docker compose up -d and docker compose ps. Expect web running and web-old exited. Keep the old container for rollback as Step 6 explains; never start both against the same data.
RULES FOR YOU:
- Keep these versions; no latest or invented options. On error show the exact text and read https://github.com/composerize/composerize and https://github.com/lavie/runlike before guessing.
- Socket access gives Docker control even with :ro. Keep drafts private; never send output or passwords to a converter website.
- notes.example.com, change-me and all sample names are dummy values. Never ask me to paste passwords, tokens or keys into chat.
Step 1: Make a private work folder#
Both tools print your settings, so the files they create go into one private folder: ~/docker_volumes/convert.
Linux#
mkdir -p ~/docker_volumes/convert/{work,backups}
chmod 700 ~/docker_volumes/convert
cd ~/docker_volumes/convert/work
Windows (PowerShell)#
$base = "$HOME\docker_volumes\convert"
foreach ($d in "work","backups") { New-Item -ItemType Directory -Force "$base\$d" | Out-Null }
Set-Location "$base\work"
Mac (Terminal)#
Same commands as Linux.
Check it worked. pwd (Windows: Get-Location) ends in convert/work.
Tip:
chmod 700keeps other users out. The files inworkcan hold passwords, so never commit them to Git as they are.
Step 2: Install Composerize#
The official way is npm install -g composerize. We add the version so the guide keeps working.
Linux#
npm install -g [email protected] composerize --help
Windows (PowerShell)#
npm install -g [email protected] composerize --help
Mac (Terminal)#
Same commands as Linux.
Check it worked. The help text in the 1.7.6 source reads:
Convert a "docker run/create/container run/service create" command to docker-compose file. An existing compose.yaml can be passed to stdin to be merged with provided command line. Available options: -f, --format: Docker Compose format (v2x, v3x, latest). Default: latest -i, --indent: number of space for indentation. Default: 2
If npm install -g says permission denied on Linux, do not use sudo. Follow the npm page on EACCES errors, or run it without installing: npx [email protected] docker run ....
Tip:
-fmeans--format, not "file". Options such as-fand-igo before the worddocker. After it, the tool treats everything as part of your Docker command.
Step 3: Turn a docker run line into a Compose file#
Here is a made-up docker run line for a database. Every value is a dummy: the password change-me is not real, so replace it with your own.
We retain PostgreSQL 17.12 when converting this example: neither converter establishes app support for PostgreSQL 19. A major upgrade needs a separate dump/restore plan; PostgreSQL 18 changed compatibility, 19 has further migration requirements, and the 18+ image changes the default storage layout.
Linux#
cd ~/docker_volumes/convert/work composerize docker run -d --name notes-db --hostname notes-db --network appnet \ -p 5432:5432 -v notes-db-data:/var/lib/postgresql/data \ -e POSTGRES_PASSWORD=change-me -e PGDATA=/var/lib/postgresql/data/pgdata \ --restart unless-stopped postgres:17.12-alpine3.24 > notes-db.draft.yaml cat notes-db.draft.yaml
Windows (PowerShell)#
Set-Location "$HOME\docker_volumes\convert\work" composerize docker run -d --name notes-db --hostname notes-db --network appnet -p 5432:5432 -v notes-db-data:/var/lib/postgresql/data -e POSTGRES_PASSWORD=change-me -e PGDATA=/var/lib/postgresql/data/pgdata --restart unless-stopped postgres:17.12-alpine3.24 | Set-Content -Encoding ascii notes-db.draft.yaml Get-Content notes-db.draft.yaml
Mac (Terminal)#
Same commands as Linux.
Check it worked. The file must start with comments and then name: <your project name>. This is what we expect. We built it from the project's own test for a very similar command at v1.7.6 and did not run the tool, so spacing may differ a little:
# named network 'appnet' is marked as "external" (used by service 'postgres'), so either remove "external" from network definition or it needs to be created using: docker network create -d bridge appnet
# named volume 'notes-db-data' is marked as "external" (used by service 'postgres'), so either remove "external" from volume definition or it needs to be created using: docker volume create notes-db-data
name: <your project name>
services:
postgres:
container_name: notes-db
hostname: notes-db
networks:
- appnet
ports:
- 5432:5432
volumes:
- notes-db-data:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=change-me
- PGDATA=/var/lib/postgresql/data/pgdata
restart: unless-stopped
image: postgres:17.12-alpine3.24
networks:
appnet:
external: true
name: appnet
volumes:
notes-db-data:
external: true
name: notes-db-data
Notice three things. The service is named after the image (postgres), not the container. -d has no Compose key, so it disappears (a long --detach is listed as an "ignored option" in a comment). And name: <your project name> and the external: true blocks are not ready yet; we fix them in Step 6.
Tip: If you do not want a command-line tool, composerize.com does the same in the browser. It is a static page that loads third-party scripts (analytics, as we saw in its source), and a user once pasted sensitive data there by mistake (issue 180). Paste only dummy values, or use the command line.
Step 4: Install runlike#
The easiest route on all three systems is the official Docker image: nothing to install. It needs the Docker socket, a strong permission (see Security). The README also lists prebuilt binaries, Homebrew (macOS Apple Silicon and Linux), an apt repository and go install.
Linux#
alias runlike='docker run --rm -v /var/run/docker.sock:/var/run/docker.sock assaflavie/runlike:2.0.0' runlike --help
Put the alias line in ~/.bashrc to keep it.
Windows (PowerShell)#
function Invoke-Runlike { docker run --rm -v /var/run/docker.sock:/var/run/docker.sock assaflavie/runlike:2.0.0 @args }
Set-Alias runlike Invoke-Runlike
runlike --help
Put the two lines in your $PROFILE to keep them. Docker Desktop must be running in Linux-container mode.
Mac (Terminal)#
Same commands as Linux. In zsh put the alias line in ~/.zshrc.
Check it worked. --help lists the options from the README: -p/--pretty, --no-name, -l/--no-labels, --use-volume-id, -s/--stdin and --shell.
No socket mount? Pipe Docker's own dump to the image instead. It has less detail (no image data), so values the image sets are printed too:
docker inspect web | docker run --rm -i assaflavie/runlike:2.0.0 --stdin
Tip: On a Mac, a runlike binary downloaded with a browser can be blocked by Gatekeeper because it is not signed (issue 144). The reporter's fixes: download with
curl, or runxattr -d com.apple.quarantine runlike-darwin-arm64. The Docker image avoids the problem.
Step 5: From a running container to a Compose file#
Our disposable demo only sleeps. For an existing container, skip creation and use its name.
Linux#
cd ~/docker_volumes/convert/work docker network create appnet docker run -d --name web --restart=unless-stopped -p 8080:80 -e 'GREETING=hello world' -v data:/data --network appnet --network-alias web --memory 256m --label app=demo alpine:3.25 sleep 3600 runlike --pretty web > web.run.txt cat web.run.txt composerize "$(cat web.run.txt)" > web.draft.yaml cat web.draft.yaml
The quotes around $(cat web.run.txt) hand the whole command to Composerize as one piece, so inner quotes survive. Do not pipe the file into composerize (see Common mistakes).
Windows (PowerShell)#
Set-Location "$HOME\docker_volumes\convert\work" docker network create appnet docker run -d --name web --restart=unless-stopped -p 8080:80 -e 'GREETING=hello world' -v data:/data --network appnet --network-alias web --memory 256m --label app=demo alpine:3.25 sleep 3600 runlike web | Set-Content -Encoding ascii web.run.txt Get-Content web.run.txt composerize (Get-Content web.run.txt -Raw) | Set-Content -Encoding ascii web.draft.yaml Get-Content web.draft.yaml
We leave out --pretty to keep one line. To run runlike's line in PowerShell itself, use runlike --shell powershell web (PowerShell 7.3 or later); for Composerize keep the default.
Mac (Terminal)#
Same commands as Linux.
Check it worked. runlike prints a docker run line. The quoted README output below keeps its original Alpine 3.20 tag; our refreshed demo uses 3.25, so expect that tag in your output (the README's output is tab-indented):
docker run \ --name=web \ '--env=GREETING=hello world' \ --detach \ --network=appnet \ --network-alias=web \ --publish=8080:80 \ --volume=data:/data \ --memory=256m \ --restart=unless-stopped \ --label=app=demo \ alpine:3.20 \ sleep 3600
If runlike cannot copy something exactly, it prints runlike: warning: lines on stderr. Read them; they never end up in the file.
Then open web.draft.yaml. We could not run the second half of the chain, so we cannot show its exact text. Check that it has: container_name: web, a port 8080:80, one environment entry GREETING=hello world (not two), the volume data:/data with a top-level data volume, the network appnet, a memory limit (Composerize writes it under deploy.resources.limits), restart: unless-stopped, the label app=demo, and image: alpine:3.25 with command: sleep 3600. The tool does not warn about every miss, so fix by hand what is wrong.
Step 6: Review the draft and switch over#
We review and validate each draft before stopping the old container:
| Line | What to do |
|---|---|
name: <your project name> | Replace it with a short lowercase name such as web. Compose rejects the placeholder. |
external: true on a volume | Keep it if the volume already holds your data (Compose reuses that exact volume). Remove it for a new empty setup. Without it, Compose makes a new volume <project>_<volume> and your old data is not used. |
external: true on a network | Keep it if the network exists, otherwise remove it. |
Passwords in environment: | Move them to a .env file (chmod 600) and write ${DB_PASSWORD} in the YAML. |
ports: | 5432:5432 publishes the port to your whole network. Use 127.0.0.1:5432:5432 or remove it if only other containers need it. |
$(...) | Compose does not run shell expressions. Replace them with ${VAR} from .env or a literal path. |
For the refreshed demo, this is the file we would keep. We wrote it by hand, and it is not Composerize's output:
name: web
services:
web:
image: alpine:3.25
container_name: web
command: sleep 3600
restart: unless-stopped
ports:
- "8080:80"
environment:
GREETING: "hello world"
volumes:
- data:/data
networks:
appnet:
aliases:
- web
mem_limit: 256m
labels:
app: demo
networks:
appnet:
external: true
volumes:
data:
external: true
Save it as compose.yaml in a folder of its own, such as ~/docker_volumes/web/. Then check it, stop the old container, and start the new one:
Linux#
cd ~/docker_volumes/web docker compose config -q docker stop web docker rename web web-old docker compose up -d docker compose ps
Windows (PowerShell)#
Set-Location "$HOME\docker_volumes\web" docker compose config -q docker stop web docker rename web web-old docker compose up -d docker compose ps
Mac (Terminal)#
Same commands as Linux.
Check it worked. docker compose config -q prints nothing when the file is valid (Docker's reference: -q only validates). docker compose ps shows web running, and docker ps -a still lists web-old as exited. If the new container misbehaves, docker compose down, then docker rename web-old web and docker start web return you to the start. When you are happy, docker rm web-old.
Tip: Never run the new and the old container side by side. They fight over the container name, the host ports and, for a database, the same data files. Stop the old one first, as above.
The reverse: Decomposerize#
Decomposerize is Composerize's twin. It turns a Compose file into docker run lines. Its npm version is 1.4.4. The README shows decomposerize << docker-compose.yml, but << in a shell starts a here-document and waits for input. The tool reads standard input (we read its cli.js), so use <:
npm install -g [email protected] decomposerize < compose.yaml
On Windows PowerShell < does not exist, so use Get-Content compose.yaml -Raw | decomposerize. The result is launch commands, not a perfect copy of your project.
What these tools miss#
| What | Why |
|---|---|
| Your data | Neither tool touches volume contents. Back up first with our docker-volume-backup guide. |
| What is not in the text | Composerize converts only the words you give it. An out-of-date command gives an out-of-date file. |
| Secrets | Both print environment variables in clear text. The output is as secret as the container. |
| Client-only options | --pull, --detach-keys, --sig-proxy, --quiet are never stored by Docker, so runlike cannot print them. --env-file and --label-file come back as expanded values. |
| Moved tags, networks, seccomp | The copy runs what the tag points to today (runlike warns). Some network settings need docker network connect after. A seccomp file comes back as JSON, an exec-form health check in shell form. |
| Compose-only features | depends_on, health-based start order, profiles and .env are not in docker run. You add them (see our Docker Compose guide). |
Put it behind HTTPS with Traefik? Only if the app has a web page#
The two tools open no port, so they need no HTTPS. The web apps you convert may, and they keep their labels: and ports:. This is for a server with a domain; at home you can skip it.
With Traefik#
Our Traefik guide explains the proxy. Add the labels to the converted service and put it on the external proxy network (create it once with docker network create proxy). The domain is a dummy:
labels:
- traefik.enable=true
- traefik.http.routers.notes.rule=Host(`notes.example.com`)
- traefik.http.routers.notes.entrypoints=https
- traefik.http.routers.notes.tls=true
- traefik.http.routers.notes.tls.certresolver=le
- traefik.http.services.notes.loadbalancer.server.port=80
networks:
- proxy
Remove that service's ports: entry so the app is reachable only through the proxy.
Without Traefik: Caddy#
Our Caddy guide shows the install. The Caddyfile is two lines, and Caddy gets a Let's Encrypt certificate by itself for a public domain (ports 80 and 443 open):
notes.example.com {
reverse_proxy localhost:8080
}
At home with no public domain, add tls internal inside the block. Caddy then uses its own local certificate, and you trust its root once on each computer. Check with curl -I https://notes.example.com.
Security and testing#
| Control | How |
|---|---|
| Docker socket | The runlike image needs it. Socket access equals root on the host, and :ro does not make the Docker API read-only. Use the --stdin route, a prebuilt binary or a socket proxy if that worries you. |
| New, AI-written tool | runlike 2.0.0 is a month old and its README says AI coding agents write it. It only prints text, but read every line it prints. |
| Output files | They hold passwords. Keep them in the chmod 700 folder, out of Git, chats and websites. |
| Pinned versions | [email protected] and assaflavie/runlike:2.0.0, never latest. |
| Validate | docker compose config -q on every draft before up. |
Status test: docker compose ps shows your service running. Functionality test: open the app or run docker compose logs --tail=50.
Common mistakes#
| Mistake | Why it happens | Do this instead |
|---|---|---|
Starting a draft with name: <your project name> | Composerize prints a placeholder. Compose's source rejects it: invalid project name "<your project name>": must consist only of lowercase alphanumeric characters, hyphens, and underscores as well as start with a letter or number (compose-go loader) | Replace it with a short lowercase name |
Keeping external: true for a volume that does not exist | Composerize cannot know. A user's container would not start (issue 746); Compose's source says external volume "<name>" not found (create.go) | Remove external, or run docker volume create <name> |
Dropping external: true for an old volume | No error: Compose makes a new empty <project>_<volume> and your data seems gone | Keep it when the data must stay |
Shell expressions such as $(id -u) or $(pwd) | Older Composerize cut them up: PUID=$(id (issue 744, fixed May 2025). Now they pass through, and Compose does not run them | Use ${PUID} from .env or a literal path |
| A path with spaces, unquoted | runlike 1.x printed --volume /path/Music Drive/Sound Files:/music, and Composerize produced image: Drive/P/Sound (issue 724, runlike 134) | Use runlike 2.0 (it quotes paths). Always read the image: line |
| Putting options after the image name | Everything after the image is the container's own command: Composerize wrote command: --name my_foobar_container -p 80:80 (issue 747) | Put every option before the image |
Piping the command into composerize | The CLI reads piped input as an existing Compose file to merge (cli.js). Text that is not a run command gives must have at least a valid docker/podman run/create/service create/container run command | Pass the command as arguments or as one quoted string |
Feeding raw docker inspect JSON to Docker | docker create $(cat container.json) fails with invalid reference format (docker/cli issue 4023) | docker inspect web | runlike --stdin, or runlike web |
| Installing runlike with pip on a modern distro | pip3 install runlike stops with error: externally-managed-environment (issue 1514). And PyPI only has the old 1.5.4 | Use the 2.0.0 image, binary or Homebrew |
| Starting the copy next to the original | Conflict. The container name "/my-redis" is already in use by container "***". You have to remove (or rename) that container to be able to reuse that name. (compose issue 7454). Ports collide too: Bind for 0.0.0.0:443 failed: port is already allocated (laradock issue 319) | Stop and rename the old one (Step 6), or use runlike --no-name for a test copy |
AI assistants: $(runlike web) as a clone shortcut, pip install runlike, runlike --compose, composerize -f compose.yaml, a version: "3.8" line | Old tutorials and the old 1.x README. A bare $(runlike web) splits GREETING=hello world into two broken arguments (2.0 README). runlike has no compose option. -f is --format, so a file name gives Unknown ComposeVersion 'compose.yaml' (CLI source). Compose says the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion (compose-go) | Use eval "$(runlike --no-name web)" or print and read first; pass the command as arguments; leave out version: |
Tip: Run
docker compose config -qbefore everyup. It catches the placeholder name and many typos in seconds.
Tip: When a draft looks wrong, convert the line with only
--name,-pand the image, then add one option at a time.
Troubleshooting#
| Problem | Solution |
|---|---|
composerize: command not found | Reopen the terminal and check that the folder shown by npm config get prefix (its bin) is on your PATH, or use npx [email protected] .... |
| Composerize waits and prints nothing | It runs without a terminal (a script, CI or ssh host command), so it reads standard input to the end. Press Ctrl+C and run it in a normal terminal with the command as arguments. |
Unknown ComposeVersion '...' | -f is the format (v2x, v3x, latest), not a file. Drop it. |
merge conflicts require an interactive terminal to choose old or new values | An existing Compose file came in on standard input and clashes with the new service. Run it in a normal terminal and choose. |
runlike: permission denied on the Docker socket | Your user cannot reach Docker. Check that docker ps works first. |
runlike: warning: ... lines | Read them. They list what could not be copied (MAC address, networks, moved image). |
invalid project name "<your project name>"... or external volume "..." not found | See the first two rows of Common mistakes. |
Known bugs and traps (December 2026)#
- Composerize: the issue list we read on 5 December 2026 shows only closed reports, and the ones above were fixed in 2025. Your command can still be one the parser has not met, so read the result.
- runlike 2.0.0 closed five old bugs on release day (dropped entrypoint arguments, volumes with spaces, single quotes in arguments). If a script parses the old output, check it: 2.0 prints
--flag=valueand leaves default values out. - Mac binary: the Gatekeeper block (issue 144) was closed on the day it was opened. We did not check whether a later build is signed.
--stdinmode has less detail: no image data, so values the image already sets are printed too.
Diagnose with docker logs <name> --tail 100, docker compose ps and docker inspect <name>.
Updates and backups#
Update. Nothing runs in the background. Read the release notes, then change the number: npm install -g composerize@<new-version> and the tag in your runlike alias. Run an old command again and compare.
What to save. The drafts and reviewed files hold secrets. This script packs the work folder with the date; keep the archive private.
Linux and Mac#
Save as ~/docker_volumes/convert/save-work.sh:
#!/usr/bin/env bash set -euo pipefail base="$HOME/docker_volumes/convert" out="$base/backups/work-$(date +%F).tar.gz" tar -czf "$out" -C "$base" work chmod 600 "$out"
Run chmod 700 on it and add 0 3 * * 0 /home/<your-user>/docker_volumes/convert/save-work.sh with crontab -e (weekly, Sunday 03:00; on a Mac write /Users/<your-user>/...).
Windows (PowerShell)#
Save as $HOME\docker_volumes\convert\save-work.ps1:
$base = "$HOME\docker_volumes\convert" tar.exe -czf "$base\backups\work-$(Get-Date -Format yyyy-MM-dd).tar.gz" -C $base work
In Task Scheduler run powershell.exe -NoProfile -File <full-path-to-the-script> weekly.
Restore test. Unpack into a scratch folder and validate one file:
mkdir -p /tmp/restore-test && tar -xzf ~/docker_volumes/convert/backups/work-<date>.tar.gz -C /tmp/restore-test docker compose -f /tmp/restore-test/work/web.draft.yaml config -q rm -rf /tmp/restore-test
On Windows use tar.exe -xzf into a scratch folder. A draft that still has the placeholder name fails the check, which is expected. This tests the files, not your application data.
Performance and resources#
Both tools are tiny and the project gives no RAM or CPU figures; we measured none. The runlike 2.0.0 release files are 3.5 to 3.8 MB each, and the image is about 69 MB compressed for amd64 because it contains the Docker CLI. The container lives only while the command runs (--rm).
FAQ#
Does runlike start or change my container? No. It runs docker container inspect and docker image inspect and prints text. Running that text is your decision.
Can I trust composerize.com? It is a static page by the project, but it loads third-party scripts, so paste only dummy values. The command-line tool keeps everything on your computer.
Can I convert Compose into Kubernetes files? Not with these tools. See our Kompose guide. For Compose basics read our Docker Compose guide, and to deploy Compose files from Git see Doco-CD.
Sources#
- Example-image review, 5 December 2026: Alpine 3.21, 3.22, 3.23, 3.24 and 3.25; official Alpine tags. The package changes do not affect the sleep-only demo. PostgreSQL 17 release index, 18 notes, 19 notes and image storage notes.
- runlike repository and README (read 5 December 2026), release v2.0.0 (November 2026), LICENSE.txt, PyPI page (1.5.4, January 2025), Docker Hub assaflavie/runlike (tag 2.0.0, November 2026)
- Composerize repository and README, source and tests at v1.7.6 (May 2026), npm composerize, composerize.com
- Decomposerize (npm 1.4.4, January 2025)
- Docker: docker compose config, docker container run, Compose volumes, Docker Desktop FAQ; npm EACCES page
- GitHub issues (read 5 December 2026): composerize 180, 724, 744, 746, 747; runlike 134, 144; docker/cli 4023; docker/compose 7454; laradock 319; tteck/Proxmox 1514
Checked against the official docs on 2026-12-05.