Skip to content
| Marketplace
Sign in
Visual Studio Code>Visualization>Docker Compose VisualizerNew to Visual Studio Code? Get it now.
Docker Compose Visualizer

Docker Compose Visualizer

Suleyman Gumus

| (0) | Free
Interactive Docker Compose dependency graph (pan/zoom, drag), compare two files side by side, Compose Hub sidebar, and optional Mermaid export for docs.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Docker Compose Visualizer

A VS Code extension that turns Docker Compose YAML into an interactive dependency graph (Cytoscape + Dagre: pan, wheel zoom, draggable nodes) plus a HUD-style roster.

Features

  • Editor title button: When the active file looks like Compose (YAML + filename / services: probe), a circuit-board icon appears in the editor toolbar—same idea as Markdown preview—running Compose Visualizer: Open Preview.
  • Activity Bar — Compose Viz: Sidebar Compose Hub with:
    • Preview: open the visualizer for the current editor (when detection matches).
    • Open file: file picker + recent opens (last 15 per workspace): short label, relative time, hover for full path and timestamp.
    • Compare: pick two files at once or one-by-one + recent compares with hover details.
  • Compare two compose files: BLUE (left) vs RED (right) columns in the graph, Dagre layout per side then shifted so graphs face each other; dashed pair edges link services that exist in both files by name. Dual roster columns with Reveal in YAML targeting the correct file.
  • Single file: resolve compose at workspace root (common filenames or dockerComposeVisualizer.composeFile), or Command Palette / picker.
  • Live refresh when watched compose file(s) change on disk.
  • Copy Mermaid to Clipboard: copies Mermaid diagram text for the current single-file dependency view (useful for READMEs, wikis, or other tools that render Mermaid).

Commands

Command Description
Compose Visualizer: Open Settings → root scan → file picker → panel.
Compose Visualizer: Open Preview Active editor file (compose detection).
Compose Visualizer: Pick Compose File… Picker only; updates recent list.
Compose Visualizer: Compare Two Files Pick two YAMLs → compare panel.
Compose Visualizer: Copy Mermaid to Clipboard Copies the last generated Mermaid diagram text (single-file view only).

Settings

ID Description
dockerComposeVisualizer.composeFile Workspace-relative path override.
dockerComposeVisualizer.rootFileNames Filenames probed at workspace root.
dockerComposeVisualizer.uiDensity compact or comfortable roster layout.

Development

npm install
npm run bundle-graph  # builds media/graph-vendor.js (Cytoscape + dagre)
npm run compile

vscode:prepublish runs compile and bundle-graph.

Press F5, then use the Compose Viz activity bar view or Compose Visualizer: Open.

Example compose files

File Role
examples/sample-compose.yml Baseline stack: db → api → web (with optional profile on web).
examples/sample-compose.compare-b.yml Alternate stack: same names db, api, web for pair edges, plus redis and worker so the right column is busier in Compare mode.

Try compare: Command Palette → Compose Visualizer: Compare Two Files → select sample-compose.yml then sample-compose.compare-b.yml (or pick both in one dialog).

Publishing

Telemetry: This extension does not collect telemetry.

One-time setup

  1. Publisher — Create a publisher at Visual Studio Marketplace — Manage Publishers. Set "publisher" in package.json to that exact id (replace "local").
  2. Git repository — Push this project to GitHub (or another host). Replace every your-username segment in repository, bugs, and homepage in package.json so README links resolve when vsce packages the extension.
  3. Optional rename — The extension id is publisher.name. To ship as your-publisher.docker-compose-visualizer, change the "name" field once before the first public release (later renames are treated as a new extension).

Build a .vsix (local or CI)

@vscode/vsce is a dev dependency. vsce package runs vscode:prepublish for you (compile + bundle-graph).

npm install
npm run vsix

After a fresh clone, media/graph-vendor.js is missing until prepublish runs (it is gitignored). Do not ship without running prepublish or the graph webview will break.

Publish to the Marketplace

  1. Create a Personal Access Token with Marketplace (Manage) scope (Azure DevOps account linked to your publisher).
  2. Log in and publish:
npx vsce login <your-publisher-id>
npx vsce publish

Use vsce publish patch (or minor / major) to bump version and publish in one step.

Pre-flight checklist

Step Notes
npm audit Fix issues where safe (npm audit fix).
Smoke test Extension Development Host (F5): Open, Compare with examples/, Compose Hub sidebar, editor title button.
Metadata Icon is media/icon.png (128×128). Update Marketplace description if you shorten the README for the gallery.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft