<?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: Circuit Times</title>
    <description>The latest articles on DEV Community by Circuit Times (@circuittimes).</description>
    <link>https://dev.to/circuittimes</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%2F4263451%2F71112903-fbfd-4bd5-bf82-c70ce10a6444.png</url>
      <title>DEV Community: Circuit Times</title>
      <link>https://dev.to/circuittimes</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/circuittimes"/>
    <language>en</language>
    <item>
      <title>Three things a 13-test lab showed us about dev containers</title>
      <dc:creator>Circuit Times</dc:creator>
      <pubDate>Fri, 27 Nov 2026 00:53:38 +0000</pubDate>
      <link>https://dev.to/circuittimes/three-things-a-13-test-lab-showed-us-about-dev-containers-3098</link>
      <guid>https://dev.to/circuittimes/three-things-a-13-test-lab-showed-us-about-dev-containers-3098</guid>
      <description>&lt;p&gt;We ran a small lab for a guide on dev containers: six tiny projects, 13 tests, all through the Dev Container CLI with no editor attached. Every test asserts its result, so the script stops when something differs.&lt;/p&gt;

&lt;p&gt;Three results were worth writing down.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. forwardPorts did nothing without an editor
&lt;/h2&gt;

&lt;p&gt;With the CLI alone, a project that asked for &lt;code&gt;forwardPorts&lt;/code&gt; had no published port at all.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker port output: []
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A second project used &lt;code&gt;appPort&lt;/code&gt; and Docker showed the port, bound to the local address.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker port output: [8000/tcp -&amp;gt; 127.0.0.1:8000]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The specification recommends &lt;code&gt;forwardPorts&lt;/code&gt; in most cases, and VS Code applies it once it connects. Our finding is narrower: in a CLI-only setup, nothing connects, so nothing is forwarded. We did not test how VS Code forwards ports.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Only two lifecycle commands run on a second start
&lt;/h2&gt;

&lt;p&gt;Each lifecycle command appended its own name to a file. After the first &lt;code&gt;devcontainer up&lt;/code&gt;, a stop, and a second &lt;code&gt;up&lt;/code&gt;, the file read:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;onCreateCommand
updateContentCommand
postCreateCommand
postStartCommand
postAttachCommand
postStartCommand
postAttachCommand
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So one-time setup, such as installing dependencies, belongs in &lt;code&gt;postCreateCommand&lt;/code&gt;. Anything that must happen on every start belongs in &lt;code&gt;postStartCommand&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. A Feature is a shell script, and it failed on Alpine
&lt;/h2&gt;

&lt;p&gt;A tiny local Feature installed fine on an Alpine base image. The GitHub CLI Feature from the official collection did not.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;./install.sh: line 101: apt-get: &lt;span class="nb"&gt;command&lt;/span&gt; not found
outcome: error
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Its install script calls &lt;code&gt;apt-get&lt;/code&gt;, which Alpine does not have. This is one Feature on one image, not a verdict on Features. The lesson is to check which base images a Feature was written for before pairing it with a small one.&lt;/p&gt;

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

&lt;p&gt;The lab files and both transcripts are public: &lt;a href="https://github.com/circuittimes/dev-containers-lab" rel="noopener noreferrer"&gt;circuittimes/dev-containers-lab&lt;/a&gt;. You need Docker, Node.js and the Dev Container CLI. Read the script before you run it, because it starts and removes containers.&lt;/p&gt;

&lt;p&gt;The full write-up, with the other ten tests, the VS Code steps and the limits of the lab, is on Circuit Times: &lt;a href="https://circuittimes.com/cloud-dev/dev-containers/" rel="noopener noreferrer"&gt;Dev Containers Guide&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Disclosure: Circuit Times used Claude, an AI model made by Anthropic, to help write and run this lab. Run on Linux with Docker 29.10.0 and Dev Container CLI 0.90.0. Results on other versions can differ.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>docker</category>
      <category>devops</category>
      <category>vscode</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
