<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Artem</title>
    <description>The latest articles on DEV Community by Artem (@artemkozak).</description>
    <link>https://dev.to/artemkozak</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3985602%2Fd00f7673-e550-49fa-84dc-788c126072ee.png</url>
      <title>DEV Community: Artem</title>
      <link>https://dev.to/artemkozak</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/artemkozak"/>
    <language>en</language>
    <item>
      <title>I Built DockGraph: A Live Topology Map for Docker and Compose</title>
      <dc:creator>Artem</dc:creator>
      <pubDate>Mon, 15 Jun 2026 13:48:12 +0000</pubDate>
      <link>https://dev.to/artemkozak/i-built-a-live-docker-topology-viewer-because-docker-ps-stopped-being-enough-3gme</link>
      <guid>https://dev.to/artemkozak/i-built-a-live-docker-topology-viewer-because-docker-ps-stopped-being-enough-3gme</guid>
      <description>&lt;p&gt;As my Docker setup grew, &lt;code&gt;docker ps&lt;/code&gt; and Compose files stopped giving me the full picture.&lt;/p&gt;

&lt;p&gt;I could see which containers were running, but I could not quickly answer the questions I actually cared about:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;which containers are attached to which networks&lt;/li&gt;
&lt;li&gt;what depends on what&lt;/li&gt;
&lt;li&gt;where volumes are mounted&lt;/li&gt;
&lt;li&gt;what belongs to which Compose project&lt;/li&gt;
&lt;li&gt;what changed after something restarted&lt;/li&gt;
&lt;li&gt;which services are defined but not running yet&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I wanted a simple way to &lt;em&gt;see&lt;/em&gt; the topology of a Docker host, not just list containers.&lt;/p&gt;

&lt;p&gt;So I built &lt;strong&gt;DockGraph&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Links:&lt;/strong&gt; &lt;a href="https://github.com/dockgraph/dockgraph" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; · &lt;a href="https://dockgraph.dev" rel="noopener noreferrer"&gt;Website&lt;/a&gt; · &lt;a href="https://hub.docker.com/r/dockgraph/dockgraph" rel="noopener noreferrer"&gt;Docker image&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  What DockGraph does
&lt;/h2&gt;

&lt;p&gt;DockGraph connects to the Docker socket and builds a live, interactive view of your Docker infrastructure.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3vofvexrw15h53dpat0z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3vofvexrw15h53dpat0z.png" alt="DockGraph live topology graph showing containers, networks, volumes, and dependencies" width="799" height="392"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It shows containers, networks, volumes, and their relationships as a graph that updates as your setup changes. Containers are grouped by network, &lt;code&gt;depends_on&lt;/code&gt; relationships appear as edges, and named volumes are linked to the containers that mount them.&lt;/p&gt;

&lt;p&gt;The goal is not to replace the Docker CLI. The goal is to make the structure of a Docker setup easier to understand at a glance.&lt;/p&gt;

&lt;h2&gt;
  
  
  The main views
&lt;/h2&gt;

&lt;p&gt;DockGraph currently has three main ways to inspect your setup.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Topology graph
&lt;/h3&gt;

&lt;p&gt;This is the main view.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2tu387hup97ll07wpxdn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2tu387hup97ll07wpxdn.png" alt="DockGraph graph view with a selected container and live details panel" width="800" height="392"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It shows your Docker infrastructure as an interactive graph:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;containers&lt;/li&gt;
&lt;li&gt;networks&lt;/li&gt;
&lt;li&gt;volumes&lt;/li&gt;
&lt;li&gt;dependencies&lt;/li&gt;
&lt;li&gt;volume mounts&lt;/li&gt;
&lt;li&gt;multi-network connections&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can click nodes and edges to highlight related resources and fade unrelated ones, which makes larger setups easier to inspect.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Table view
&lt;/h3&gt;

&lt;p&gt;Graphs are useful, but sometimes a table is faster.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz8jnvoskijj27m9acba2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz8jnvoskijj27m9acba2.png" alt="DockGraph table view grouped by Docker network with container status and resource usage" width="800" height="392"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The table view gives a more structured overview with sortable columns and grouping by things like Compose project, network and status.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Dashboard view
&lt;/h3&gt;

&lt;p&gt;There is also a dashboard with resource charts, top consumers, event timeline, alerts, disk usage, image information, and Compose project overview.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4lvkgk6i914r8l8k2nee.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4lvkgk6i914r8l8k2nee.png" alt="DockGraph dashboard view with container status, Docker host information, disk usage, images, and resource charts" width="800" height="392"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is useful when you want a broader health/status view instead of only the topology.&lt;/p&gt;

&lt;h2&gt;
  
  
  Logs without losing the map
&lt;/h2&gt;

&lt;p&gt;One thing I wanted was to inspect logs without constantly jumping between terminal windows.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F381f0jeg1ll2r52ty7vq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F381f0jeg1ll2r52ty7vq.png" alt="DockGraph global logs view showing logs from multiple containers in one stream" width="800" height="393"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;DockGraph has a global log view that aggregates container logs into one time-ordered stream. You can filter by text, regex, or container, and follow events across multiple services.&lt;/p&gt;

&lt;p&gt;You can also open logs for a specific container in a floating pop-out window. These windows can be moved, resized, minimized, searched, and grouped into tabs.&lt;/p&gt;

&lt;p&gt;That makes it easier to keep the topology visible while still digging into what one service is doing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Compose-aware, even before services start
&lt;/h2&gt;

&lt;p&gt;A feature I personally find useful is that DockGraph can parse Compose files, not just running Docker resources.&lt;/p&gt;

&lt;p&gt;If you mount a Compose file or a directory containing Compose files, DockGraph can show services that are defined but not currently running.&lt;/p&gt;

&lt;p&gt;That means the graph can represent both:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;what is running now&lt;/li&gt;
&lt;li&gt;what is defined in your Compose setup&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example, you can mount a single file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;volumes&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;/var/run/docker.sock:/var/run/docker.sock:ro&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;./compose.yml:/compose/compose.yml:ro&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or mount a directory of stacks:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;volumes&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;/var/run/docker.sock:/var/run/docker.sock:ro&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;./stacks:/compose/stacks:ro&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;DockGraph will auto-detect Compose files from mounted volumes. You can also override that with &lt;code&gt;DG_COMPOSE_PATH&lt;/code&gt; if you want to scan only specific files or directories.&lt;/p&gt;




&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;The simplest way to run it is as a single container:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker run &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-p&lt;/span&gt; 7800:7800 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-v&lt;/span&gt; /var/run/docker.sock:/var/run/docker.sock:ro &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--label&lt;/span&gt; dockgraph.self&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;true&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  dockgraph/dockgraph
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then open:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;http://localhost:7800
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;dockgraph.self=true&lt;/code&gt; label tells DockGraph to hide its own container from the graph.&lt;/p&gt;

&lt;h2&gt;
  
  
  Docker Compose example
&lt;/h2&gt;

&lt;p&gt;You can also add it to an existing Compose stack:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;services&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;dockgraph&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;dockgraph/dockgraph:latest&lt;/span&gt;
    &lt;span class="na"&gt;ports&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;7800:7800"&lt;/span&gt;
    &lt;span class="na"&gt;volumes&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;/var/run/docker.sock:/var/run/docker.sock:ro&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;./compose.yml:/compose/compose.yml:ro&lt;/span&gt;
    &lt;span class="na"&gt;labels&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;dockgraph.self&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;true"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The Compose file mount is optional, but it enables DockGraph to show services before they are running.&lt;/p&gt;




&lt;h2&gt;
  
  
  Security notes
&lt;/h2&gt;

&lt;p&gt;DockGraph needs access to the Docker socket so it can read container, network, and volume state.&lt;/p&gt;

&lt;p&gt;The socket is mounted &lt;strong&gt;read-only&lt;/strong&gt; in the examples above, and DockGraph itself only observes Docker resources. It &lt;strong&gt;does not&lt;/strong&gt; start, stop, or modify containers.&lt;/p&gt;

&lt;p&gt;That said, Docker socket access is still sensitive. If you expose DockGraph outside a trusted local environment, you should put it behind proper protection.&lt;/p&gt;

&lt;p&gt;DockGraph supports optional password protection with &lt;code&gt;DG_PASSWORD&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;environment&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;DG_PASSWORD&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;your-secure-password"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also bind it to localhost:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;environment&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;DG_BIND_ADDR&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;127.0.0.1"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Environment values with credential-like keys such as &lt;code&gt;PASSWORD&lt;/code&gt;, &lt;code&gt;SECRET&lt;/code&gt;, &lt;code&gt;KEY&lt;/code&gt;, &lt;code&gt;TOKEN&lt;/code&gt;, and &lt;code&gt;AUTH&lt;/code&gt; are masked before being sent to the browser.&lt;/p&gt;

&lt;p&gt;If exposing it beyond a local machine or trusted network, use a reverse proxy such as Caddy, nginx, or Traefik for HTTPS.&lt;/p&gt;

&lt;h2&gt;
  
  
  Implementation
&lt;/h2&gt;

&lt;p&gt;DockGraph is built as a single Go binary with the frontend embedded.&lt;/p&gt;

&lt;p&gt;The production image is distroless, and the app does not need a database or any extra services to run.&lt;/p&gt;

&lt;p&gt;Under the hood, it has two collectors:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a Docker collector that reads Docker state and watches the event stream&lt;/li&gt;
&lt;li&gt;a Compose collector that detects and parses mounted Compose files&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The frontend receives the unified graph over WebSocket and renders the topology interactively.&lt;/p&gt;




&lt;h2&gt;
  
  
  Current state
&lt;/h2&gt;

&lt;p&gt;DockGraph is still early, and I do not consider it fully stable yet.&lt;/p&gt;

&lt;p&gt;But it has already been useful for understanding my own Docker setup, especially when several Compose stacks, networks, and volumes are involved.&lt;/p&gt;

&lt;p&gt;I would love feedback from people running Docker at home, in homelabs, or on small servers.&lt;/p&gt;

&lt;p&gt;What would make a Docker topology view more useful for you?&lt;/p&gt;

&lt;p&gt;GitHub: &lt;a href="https://github.com/dockgraph/dockgraph" rel="noopener noreferrer"&gt;https://github.com/dockgraph/dockgraph&lt;/a&gt;&lt;br&gt;
Website: &lt;a href="https://dockgraph.dev" rel="noopener noreferrer"&gt;https://dockgraph.dev&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  License note
&lt;/h2&gt;

&lt;p&gt;DockGraph is currently under the Business Source License 1.1.&lt;/p&gt;

&lt;p&gt;You can use, modify, and redistribute it, including in production. The main restriction is offering it as a hosted service or embedding it as a feature in a commercial product. Each version converts to Apache License 2.0 four years after release.&lt;/p&gt;

</description>
      <category>docker</category>
      <category>devops</category>
      <category>selfhost</category>
      <category>observability</category>
    </item>
  </channel>
</rss>
