feat(cli): improve devcontainer support for coder show (#18793)

Fixes coder/internal#747
This commit is contained in:
Mathias Fredriksson
2025-07-08 16:16:00 +00:00
committed by GitHub
parent 2f50b3b7bb
commit 5f50dcce5a
14 changed files with 600 additions and 32 deletions
@@ -0,0 +1,9 @@
┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ RESOURCE STATUS HEALTH VERSION ACCESS │
├─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ compute.main │
│ └─ main (linux, amd64) ⦿ connected ✔ healthy v2.15.0 coder ssh test-workspace.main │
│ └─ Devcontainers │
│ └─ failed-dev ✘ error │
│ × Failed to pull image mcr.microsoft.com/devcontainers/go:latest: timeout after 5… │
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
@@ -0,0 +1,9 @@
┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ RESOURCE STATUS HEALTH VERSION ACCESS │
├─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ compute.main │
│ └─ main (linux, amd64) ⦿ connected ✔ healthy v2.15.0 coder ssh test-workspace.main │
│ └─ Devcontainers │
│ └─ long-error-dev ✘ error │
│ × Failed to build devcontainer: dockerfile parse error at line 25: unknown instru… │
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
@@ -0,0 +1,9 @@
┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ RESOURCE STATUS HEALTH VERSION ACCESS │
├────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ compute.main │
│ └─ main (linux, amd64) ⦿ connected ✔ healthy v2.15.0 coder ssh test-workspace.main │
│ └─ Devcontainers │
│ └─ long-error-dev ✘ error │
│ × Failed to build devcontainer: dockerfile parse error at line 25: unknown instruction 'INSTALL', did you mean 'RUN apt-get install'? This is a very long error message that should be truncated when detail flag is not used │
└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
@@ -0,0 +1,13 @@
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ RESOURCE STATUS HEALTH VERSION ACCESS │
├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ compute.main │
│ └─ main (linux, amd64) ⦿ connected ✔ healthy v2.15.0 coder ssh test-workspace.main │
│ └─ Devcontainers │
│ ├─ frontend (linux, amd64) [vibrant_tesla] ⦿ connected ✔ healthy v2.15.0 coder ssh test-workspace.frontend │
│ ├─ Open Ports │
│ └─ 5173/tcp [vite] │
│ ├─ backend [peaceful_curie] ⏹ stopped │
│ └─ error-container ✘ error │
│ × Container build failed: dockerfile syntax error on line 15 │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
@@ -0,0 +1,11 @@
┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ RESOURCE STATUS HEALTH VERSION ACCESS │
├──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ compute.main │
│ └─ main (linux, amd64) ⦿ connected ✔ healthy v2.15.0 coder ssh test-workspace.main │
│ └─ Devcontainers │
│ └─ web-dev (linux, amd64) [quirky_lovelace] ⦿ connected ✔ healthy v2.15.0 coder ssh test-workspace.web-dev │
│ └─ Open Ports │
│ ├─ 3000/tcp [node] │
│ └─ 8080/tcp [webpack-dev-server] │
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
@@ -0,0 +1,11 @@
┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ RESOURCE STATUS HEALTH VERSION ACCESS │
├─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ compute.main │
│ └─ main (linux, amd64) ⦿ connected ✔ healthy v2.15.0 coder ssh test-workspace.main │
│ └─ Devcontainers │
│ └─ problematic-dev (linux, amd64) [cranky_mendel] ⦿ connected ✔ healthy v2.15.0 coder ssh test-workspace.problematic-dev │
│ × Warning: Container started but healthcheck failed │
│ └─ Open Ports │
│ └─ 8000/tcp [python] │
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
@@ -0,0 +1,8 @@
┌──────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ RESOURCE STATUS HEALTH VERSION ACCESS │
├──────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ compute.main │
│ └─ main (linux, amd64) ⦿ connected ✔ healthy v2.15.0 coder ssh test-workspace.main │
│ └─ Devcontainers │
│ └─ web-server [amazing_turing] ▶ running │
└──────────────────────────────────────────────────────────────────────────────────────────────────────┘
@@ -0,0 +1,8 @@
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ RESOURCE STATUS HEALTH VERSION ACCESS │
├───────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ compute.main │
│ └─ main (linux, amd64) ⦿ connected ✔ healthy v2.15.0 coder ssh test-workspace.main │
│ └─ Devcontainers │
│ └─ database-dev [nostalgic_hawking] ⧗ starting │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────┘
@@ -0,0 +1,8 @@
┌──────────────────────────────────────────────────────────────────────────────────────────────────┐
│ RESOURCE STATUS HEALTH VERSION ACCESS │
├──────────────────────────────────────────────────────────────────────────────────────────────────┤
│ compute.main │
│ └─ main (linux, amd64) ⦿ connected ✔ healthy v2.15.0 coder ssh test-workspace.main │
│ └─ Devcontainers │
│ └─ api-dev [clever_darwin] ⏹ stopped │
└──────────────────────────────────────────────────────────────────────────────────────────────────┘
+5 -1
View File
@@ -1,9 +1,13 @@
coder v0.0.0-devel
USAGE:
coder show <workspace>
coder show [flags] <workspace>
Display details of a workspace's resources and agents
OPTIONS:
--details bool (default: false)
Show full error messages and additional details.
———
Run `coder --help` for a list of global options.