<?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: Yusuf Can TÜRK</title>
    <description>The latest articles on DEV Community by Yusuf Can TÜRK (@iamcanturk).</description>
    <link>https://dev.to/iamcanturk</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%2F436286%2F440b7486-be4d-43e2-bb6d-71066fbefb0f.jpeg</url>
      <title>DEV Community: Yusuf Can TÜRK</title>
      <link>https://dev.to/iamcanturk</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/iamcanturk"/>
    <language>en</language>
    <item>
      <title>I Wrote a Doctor for My Docker</title>
      <dc:creator>Yusuf Can TÜRK</dc:creator>
      <pubDate>Fri, 14 Aug 2026 20:20:52 +0000</pubDate>
      <link>https://dev.to/iamcanturk/i-wrote-a-doctor-for-my-docker-2o9k</link>
      <guid>https://dev.to/iamcanturk/i-wrote-a-doctor-for-my-docker-2o9k</guid>
      <description>&lt;p&gt;&lt;em&gt;Because for months I didn't really know what was running on my machine.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;One evening, at the end of a long day, I typed &lt;code&gt;docker ps&lt;/code&gt; and just stared at the output for a while. Twenty-six containers. I remembered what some of them were for; the rest were things I'd spun up months ago with a quick "let me just try this" and then forgotten. Then I typed &lt;code&gt;docker images&lt;/code&gt;: thirteen gigabytes. Layers nobody pulls anymore, images that had long since stopped mattering.&lt;/p&gt;

&lt;p&gt;That was the moment I admitted something uncomfortable: I used Docker every day, but I didn't actually know what was running inside it.&lt;/p&gt;

&lt;p&gt;Docker is a strange tool that way. It makes running something extraordinarily easy, and noticing what you're running just as hard. Six months into a project, the average developer's machine has quietly accumulated the same things: a container with the Docker socket mounted into it, a couple of databases published to &lt;code&gt;0.0.0.0&lt;/code&gt;, a dozen services running as root, and gigabytes of images nothing references. None of it sets off an alarm — not until something breaks, or someone decides to scan you.&lt;/p&gt;

&lt;h2&gt;
  
  
  The existing tools don't fill this gap
&lt;/h2&gt;

&lt;p&gt;Don't get me wrong, there are good tools. Trivy and Grype find CVEs in your images perfectly well. But they need a vulnerability database, and therefore a network, and what they look at is the packages &lt;em&gt;inside&lt;/em&gt; the image. That wasn't my problem. My problem was the &lt;strong&gt;configuration layer&lt;/strong&gt;: how I was running the container. &lt;code&gt;docker system df&lt;/code&gt; tells you disk usage but has no opinion about it; it won't say "nothing touches this volume anymore."&lt;/p&gt;

&lt;p&gt;What I wanted was a tool that answered one question: &lt;strong&gt;what is wrong with this Docker environment right now, and what should I do about it?&lt;/strong&gt; I couldn't find it, so I wrote it.&lt;/p&gt;

&lt;h2&gt;
  
  
  DoctorDock
&lt;/h2&gt;

&lt;p&gt;DoctorDock is a small command-line tool that scans your local Docker environment — with a native macOS menubar app alongside it. It finds the security problems, the misconfigurations, and the reclaimable disk, and leaves you with a health score out of 100. I wrote it in Go; single binary, no account, MIT license.&lt;/p&gt;

&lt;p&gt;To be concrete about speed: on my machine, a full scan of roughly 26 containers, 29 images, 29 volumes, and 12 networks takes about 550 ms. That's less time than it takes to read the output of &lt;code&gt;docker ps&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three decisions I made
&lt;/h2&gt;

&lt;p&gt;I decided three things up front while writing this. All three might look like missing features. I'd argue it's the opposite.&lt;/p&gt;

&lt;h3&gt;
  
  
  No AI
&lt;/h3&gt;

&lt;p&gt;I could have made this an "AI-powered security product." I didn't. Every finding is deterministic Go you can read; the same environment always produces the same output. If you wonder why a rule flagged something, you can go read the source. I don't want a security tool telling me "this might be insecure" — either it is, or it isn't.&lt;/p&gt;

&lt;h3&gt;
  
  
  Fully offline
&lt;/h3&gt;

&lt;p&gt;Zero network calls. No telemetry, no account, no update check. DoctorDock opens exactly one local socket — Docker's — and nothing else. It runs the same on an air-gapped machine and in a locked-down CI runner. What you scan stays with you.&lt;/p&gt;

&lt;h3&gt;
  
  
  Secrets stay put
&lt;/h3&gt;

&lt;p&gt;I read container environment variables as key &lt;strong&gt;names&lt;/strong&gt; only; their values never enter memory in a form that could reach a report. You'll see that a key called &lt;code&gt;DATABASE_PASSWORD&lt;/code&gt; exists — never its value. That's what makes it safe to point at production, which for a security tool should be the default, not a selling point.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it looks like
&lt;/h2&gt;

&lt;p&gt;There's nothing to do but install it and scan:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;brew &lt;span class="nb"&gt;install &lt;/span&gt;iamcanturk/tap/doctordock
doctordock scan
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The output gives your environment a score and lists the findings worst-first:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;HEALTH SCORE  37/100  poor

  1 CRITICAL · 17 HIGH · 6 MEDIUM · 22 LOW

  DD005  CRITICAL  Docker socket mounted into a container
  DD001  HIGH      Container runs as root
  DD006  MEDIUM    Database port published on 0.0.0.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you see 37/100, don't panic; most developer machines start somewhere around there on the first scan. What matters is that the list is finally visible. And every rule explains itself:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;doctordock explain DD005
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That prints what the rule looks for, why it matters, a worked attack scenario, a copy-pasteable fix, and an honest note on when it's fine to ignore. It doesn't stop at "there's a problem here" — it teaches you how to close it.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fp4zik3kmk1981rulenqn.gif" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fp4zik3kmk1981rulenqn.gif" alt="DoctorDock in the terminal: the command list, then doctordock explain DD005" width="800" height="556"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The part I worried about most: cleanup
&lt;/h2&gt;

&lt;p&gt;Honestly, cleanup is the part I was most nervous about while writing this — because one wrong command can wipe out someone's month of data. So DoctorDock deletes nothing by default:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;doctordock cleanup            &lt;span class="c"&gt;# dry run: only shows what it would remove&lt;/span&gt;
doctordock cleanup &lt;span class="nt"&gt;--apply&lt;/span&gt;    &lt;span class="c"&gt;# actually removes it&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And no flag except &lt;code&gt;--volumes&lt;/code&gt; can select a volume — not even &lt;code&gt;--all&lt;/code&gt;. You can re-pull an image and re-create a network; but when the data in a volume is gone, it's gone. So volumes only ever enter the picture when you ask for them explicitly, on their own. Nothing is deleted by accident.&lt;/p&gt;

&lt;h2&gt;
  
  
  Closing
&lt;/h2&gt;

&lt;p&gt;DoctorDock isn't a big product; it's a small, honest tool. It puts the things your Docker environment quietly accumulated over months in front of you in under a second, without leaking any of it. Like a doctor: it looks, it diagnoses, it tells you what to do — and it leaves the decision to you.&lt;/p&gt;

&lt;p&gt;If you're curious, run a scan and see what your machine actually scores. It'll probably come out lower than you think — but for the first time, you'll know exactly what to do about it.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Code: &lt;a href="https://github.com/iamcanturk/DoctorDock" rel="noopener noreferrer"&gt;github.com/iamcanturk/DoctorDock&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Download and details: &lt;a href="https://doctordock.iamcanturk.dev" rel="noopener noreferrer"&gt;doctordock.iamcanturk.dev&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>docker</category>
      <category>devops</category>
      <category>go</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
