Skip to content
| Marketplace
Sign in
Visual Studio Code>Visualization>Docker Compose Mermaid GeneratorNew to Visual Studio Code? Get it now.
Docker Compose Mermaid Generator

Docker Compose Mermaid Generator

Oskar1504

|
27 installs
| (0) | Free
Generate Mermaid diagrams from docker-compose.yml files
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Docker Compose Mermaid Generator

A powerful VSCode extension that automatically generates comprehensive Mermaid diagrams from your docker-compose.yml files, providing instant visual insights into your containerized applications and their relationships.

This was developed 98% by Claude Sonnet 4. I use it for personal use only therefore the repository may not get the required attention it deserves.

📖 Usage

Basic Usage

  1. Open any docker-compose.yml file in VSCode
  2. Right-click in the editor (or explorer) → "Generate Mermaid Diagram"
  3. Or use keyboard shortcut:
    • Windows/Linux: Ctrl+Shift+M
    • Mac: Cmd+Shift+M
  4. Choose your action:
    • View the diagram in a new tab
    • Save to file for documentation
  5. The generated .md file contains all four diagram types

Advanced Features

  • Multi-network support: Correctly handles services spanning multiple networks
  • Profile awareness: Respects Docker Compose profiles
  • External service detection: Identifies connections to external services
  • Volume sharing analysis: Shows which services share volumes
  • Resource visualization: Displays CPU/memory limits and constraints

📊 Generated Diagrams

The extension creates four comprehensive visualizations:

1. Service Architecture

graph TD
    web["web<br/>Ports: 3000:3000<br/>🔨 Build: ./web<br/>🔄 Restart: unless-stopped<br/>⚙️ Env: 5 vars<br/>🌐 Networks: app-network"]
    api["api<br/>Ports: 8080:8080<br/>📦 Image: node:18-alpine<br/>⚙️ Env: 3 vars<br/>🌐 Networks: app-network"]
    db["db<br/>📦 Image: postgres:15<br/>⚙️ Env: 4 vars<br/>🌐 Networks: db-network"]
    web --> api
    api --> db

2. Network Topology

  • Service grouping by network
  • External network identification
  • Multi-network service connections
  • Network driver information

3. Resource Allocation & Volumes

  • CPU and memory limits visualization
  • Volume sharing relationships
  • Storage driver information
  • Replica configurations

4. Detailed Service Documentation

  • Complete service specifications
  • Environment variables (truncated for security)
  • Health check configurations
  • Logging and restart policies

Keywords

docker, docker-compose, mermaid, visualization, diagram, architecture, microservices, devops, containers

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft