<?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: Jamie Steele</title>
    <description>The latest articles on DEV Community by Jamie Steele (@jamie-steele).</description>
    <link>https://dev.to/jamie-steele</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3830190%2Fca04d4de-33a9-4a3c-90d3-1f811078399d.png</url>
      <title>DEV Community: Jamie Steele</title>
      <link>https://dev.to/jamie-steele</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jamie-steele"/>
    <language>en</language>
    <item>
      <title>Run, Isolate, and Act: A Minimal Primitive for Container Workflows</title>
      <dc:creator>Jamie Steele</dc:creator>
      <pubDate>Wed, 18 Mar 2026 00:11:37 +0000</pubDate>
      <link>https://dev.to/jamie-steele/run-isolate-and-act-a-minimal-primitive-for-container-workflows-553m</link>
      <guid>https://dev.to/jamie-steele/run-isolate-and-act-a-minimal-primitive-for-container-workflows-553m</guid>
      <description>&lt;p&gt;&lt;strong&gt;dockpipe&lt;/strong&gt; is a general-purpose CLI: run any command in a disposable container, then optionally run an action on the result (e.g. commit, export patch). Same flow for tests, one-off scripts, codegen, or AI tools—not an AI framework; AI is one use case. In &lt;strong&gt;0.5&lt;/strong&gt; a default data volume means you only mount your work directory; tool state and first-time login persist in the volume.&lt;/p&gt;

&lt;p&gt;This post is a short intro to what it is, why it's useful, and how you can use it for automation and chained workflows (including AI).&lt;/p&gt;




&lt;h2&gt;
  
  
  What is dockpipe?
&lt;/h2&gt;

&lt;p&gt;dockpipe is a &lt;strong&gt;single primitive&lt;/strong&gt; for running commands in disposable containers and optionally acting on the result. It's not a workflow engine, not an AI framework, and not tied to any vendor. It's a composable building block you plug into your own scripts and automation. &lt;strong&gt;General-purpose first:&lt;/strong&gt; run tests, builds, or scripts; AI (e.g. Claude) is a strong use case but the core is command-agnostic.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The model:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Spawn&lt;/strong&gt; — Start a container from an image (default is a light dev image; you can use your own).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Run&lt;/strong&gt; — Execute whatever you pass in: a one-liner, a script, or a tool (e.g. Claude, Codex, &lt;code&gt;npm test&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Act&lt;/strong&gt; — Optionally run an action script after the command (e.g. commit all changes, export a patch, print a summary).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Your current directory is mounted at &lt;code&gt;/work&lt;/code&gt; in the container, so the command sees your project. The action runs inside the same container right after the command, with access to exit code and work dir. By default a &lt;strong&gt;named volume&lt;/strong&gt; (&lt;code&gt;dockpipe-data&lt;/code&gt;) is mounted at &lt;code&gt;/dockpipe-data&lt;/code&gt; and set as &lt;code&gt;HOME&lt;/code&gt;—tool state (e.g. first-time login) and repos persist there. Use &lt;strong&gt;&lt;code&gt;--data-vol &amp;lt;name&amp;gt;&lt;/code&gt;&lt;/strong&gt;, &lt;strong&gt;&lt;code&gt;--data-dir /path&lt;/code&gt;&lt;/strong&gt;, or &lt;strong&gt;&lt;code&gt;--no-data&lt;/code&gt;&lt;/strong&gt; to change or skip. By default the run is &lt;strong&gt;attached&lt;/strong&gt;: if you close the terminal, the container exits (no lingering processes). Use &lt;strong&gt;&lt;code&gt;-d&lt;/code&gt;&lt;/strong&gt; to run in the background and disconnect.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why use it?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Isolation without commitment&lt;/strong&gt; — Run risky or messy commands (deps, globals, one-off experiments) in a container. When the run finishes, the container is gone. Your host stays clean.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Same flow for everything&lt;/strong&gt; — One pattern for "run tests," "run a linter," "run Claude and commit," or "run my custom script." You choose the image, the command, and the action. No special cases in the tool.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pipe-friendly&lt;/strong&gt; — Stdin and stdout work normally. You can pipe a prompt in, pipe output to the next step, or chain multiple &lt;code&gt;dockpipe&lt;/code&gt; invocations in a shell script.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Composable&lt;/strong&gt; — The command can be a script. The action can be your own script. You can chain dockpipe with other tools (e.g. &lt;code&gt;dockpipe -- ./step1.sh | dockpipe -- ./step2.sh&lt;/code&gt; or use it inside a Makefile or CI). It's designed to be composed into larger workflows.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AI workflows without lock-in&lt;/strong&gt; — Great for "run an AI assistant in a container, then commit (or patch)." The core doesn't know or care that it's AI; you pass the AI tool as the command and use an action to persist the result. Same primitive works for non-AI automation.&lt;/p&gt;




&lt;h2&gt;
  
  
  Chaining and automation
&lt;/h2&gt;

&lt;p&gt;Because dockpipe is a single primitive, you can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Chain steps&lt;/strong&gt; — Run one script in a container, pipe or pass its output to the next (e.g. plan → implement → review, each in its own clean run).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automate AI workflows&lt;/strong&gt; — "Pipe prompt → run Claude (or another agent) in container → action commits or exports patch." The repo includes an example (clone, worktree, Claude, commit) you can copy or adapt.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CI-like local runs&lt;/strong&gt; — &lt;code&gt;dockpipe -- make test&lt;/code&gt; or &lt;code&gt;dockpipe -- bash -c "npm ci &amp;amp;&amp;amp; npm test"&lt;/code&gt; in a clean environment without polluting your machine.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;One-off experiments&lt;/strong&gt; — Try a new tool or version in a container; no global installs, no cleanup.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You stay in control: you pick the image, the command, and the action. The tool doesn't impose workflow structure—it just runs and (optionally) acts.&lt;/p&gt;




&lt;h2&gt;
  
  
  Try it (15 seconds)
&lt;/h2&gt;

&lt;p&gt;Install the &lt;a href="https://github.com/jamie-steele/dockpipe/releases" rel="noopener noreferrer"&gt;latest .deb&lt;/a&gt; or clone the repo and add &lt;code&gt;bin&lt;/code&gt; to your PATH. Then:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dockpipe &lt;span class="nt"&gt;--&lt;/span&gt; make &lt;span class="nb"&gt;test&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Runs &lt;code&gt;make test&lt;/code&gt; in a clean container; your dir is at &lt;code&gt;/work&lt;/code&gt;, container is removed when done. Same for &lt;code&gt;npm test&lt;/code&gt;, &lt;code&gt;cargo test&lt;/code&gt;, or any command. Sanity check: &lt;code&gt;dockpipe -- echo "hello from container"&lt;/code&gt;. Requirements: Bash and Docker.&lt;/p&gt;




&lt;h2&gt;
  
  
  Examples
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Generic command (default image):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dockpipe &lt;span class="nt"&gt;--&lt;/span&gt; &lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-la&lt;/span&gt;
dockpipe &lt;span class="nt"&gt;--&lt;/span&gt; bash &lt;span class="nt"&gt;-c&lt;/span&gt; &lt;span class="s2"&gt;"npm test"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Scaffold an action, or clone a bundled one to customize:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dockpipe action init my-action.sh
&lt;span class="c"&gt;# Or copy a bundled action: init my-commit.sh --from commit-worktree (or export-patch, print-summary)&lt;/span&gt;
&lt;span class="c"&gt;# Edit the script (DOCKPIPE_EXIT_CODE and DOCKPIPE_CONTAINER_WORKDIR are available), then:&lt;/span&gt;
dockpipe &lt;span class="nt"&gt;--action&lt;/span&gt; my-action.sh &lt;span class="nt"&gt;--&lt;/span&gt; ./my-script.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Pipe in a prompt, run Claude, commit the result:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"refactor the auth module"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  | dockpipe &lt;span class="nt"&gt;--template&lt;/span&gt; agent-dev &lt;span class="nt"&gt;--action&lt;/span&gt; examples/actions/commit-worktree.sh &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--&lt;/span&gt; claude &lt;span class="nt"&gt;--dangerously-skip-permissions&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;cat&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;(Use &lt;code&gt;--template agent-dev&lt;/code&gt; for the Node + Claude image; &lt;code&gt;--template claude&lt;/code&gt; is an alias.)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Run Claude in the background (detach):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dockpipe &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="nt"&gt;--template&lt;/span&gt; agent-dev &lt;span class="nt"&gt;--&lt;/span&gt; claude &lt;span class="nt"&gt;-p&lt;/span&gt; &lt;span class="s2"&gt;"review this code"&lt;/span&gt;
&lt;span class="c"&gt;# Prints container ID; use docker logs &amp;lt;id&amp;gt; or docker attach &amp;lt;id&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Resume a previous Claude session&lt;/strong&gt; (state lives in the default data volume):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dockpipe &lt;span class="nt"&gt;--template&lt;/span&gt; agent-dev &lt;span class="nt"&gt;--&lt;/span&gt; claude &lt;span class="nt"&gt;--resume&lt;/span&gt; &amp;lt;session-id&amp;gt; &lt;span class="nt"&gt;--dangerously-skip-permissions&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Custom image and workdir:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dockpipe &lt;span class="nt"&gt;--image&lt;/span&gt; my-dev &lt;span class="nt"&gt;--workdir&lt;/span&gt; /path/to/repo &lt;span class="nt"&gt;--&lt;/span&gt; bash &lt;span class="nt"&gt;-c&lt;/span&gt; &lt;span class="s2"&gt;"npm ci &amp;amp;&amp;amp; npm test"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Run your script, then run an action (e.g. commit or export patch):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dockpipe &lt;span class="nt"&gt;--action&lt;/span&gt; examples/actions/commit-worktree.sh &lt;span class="nt"&gt;--&lt;/span&gt; ./my-script.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  When it fits
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;You want &lt;strong&gt;isolation&lt;/strong&gt; for one-off or repeated commands without maintaining a full orchestration stack.&lt;/li&gt;
&lt;li&gt;You're building &lt;strong&gt;automation&lt;/strong&gt; (scripts, cron, local pipelines) and want a simple "run in container, then do X" step.&lt;/li&gt;
&lt;li&gt;You're &lt;strong&gt;chaining AI tools&lt;/strong&gt; (or any CLI) and want a clean boundary: run in container, then commit/patch/summarize.&lt;/li&gt;
&lt;li&gt;You like &lt;strong&gt;Unix-style composition&lt;/strong&gt;: small tools, pipes, and scripts rather than a big framework.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;dockpipe gives you one primitive: &lt;strong&gt;spawn → run → act&lt;/strong&gt;. Use it for isolated runs, automation, chained steps, or AI workflows. Same isolation as &lt;code&gt;docker run&lt;/code&gt;, with less boilerplate: consistent workdir + UID/GID, optional action phase, templates, and pipe-friendly CLI. It stays minimal and composable so you can plug it into your own scripts and tooling without adopting a framework.&lt;/p&gt;

&lt;p&gt;If you try it and have ideas or feedback, the repo is &lt;a href="https://github.com/jamie-steele/dockpipe" rel="noopener noreferrer"&gt;github.com/jamie-steele/dockpipe&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>docker</category>
      <category>cli</category>
      <category>automation</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
