Menu

Three things a 13-test lab showed us about dev containers
📰

Three things a 13-test lab showed us about dev containers

DEV Community: docker·Circuit Times·9 days ago
#VzW0fHTR
#devtodocker#devto#dev#docker#feature
Long article (400 words) — no AI summary yet.
Reading 0:00
15s threshold

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.

Three results were worth writing down.

1. forwardPorts did nothing without an editor

With the CLI alone, a project that asked for forwardPorts had no published port at all.

docker port output: []

Enter fullscreen mode

Exit fullscreen mode

A second project used appPort and Docker showed the port, bound to the local address.

docker port output: [8000/tcp -> 127.0.0.1:8000]

Enter fullscreen mode

Exit fullscreen mode

The specification recommends forwardPorts 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.

2. Only two lifecycle commands run on a second start

Each lifecycle command appended its own name to a file.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.