Skip to content

Containers: live list on Dockiva Engine, New container sheet, image icons - #65

Merged
chandarith-chea merged 2 commits into
mainfrom
app-containers-ux
Nov 10, 2026
Merged

chandarith-chea merged 2 commits into
mainfrom
app-containers-ux

Conversation

@chandarith-chea

Copy link
Copy Markdown
Collaborator

Why

  • The Containers list did not update for containers started outside the app, such as the self-hosted CI runner containers. The core watched docker events on the docker CLI's current context. On this Mac that is OrbStack, so with Dockiva Engine selected the app heard another daemon.
  • The native app had no way to create a container.
  • Every row looked the same.

Change

The list follows Dockiva Engine's events (aea1ffa)

  • With Dockiva Engine selected, the core streams the engine's GET /events over engine.sock.
  • It reconnects when the engine restarts, and asks for one refresh on each (re)connect.
  • Other runtimes keep docker events. The watch switches when the user selects another runtime.

New container sheet (6894d44): a + beside the Containers title, like docker run -d.

  • Fields:
    • image and name;
    • published TCP ports on 127.0.0.1;
    • environment variables;
    • an optional command;
    • whether to start the container.
  • Templates: PostgreSQL, Redis, MySQL, MongoDB, Nginx and Node.js.
  • The new core method is DockerService.CreateContainer(request).
    • It passes Env to Dockiva Engine.
    • It pulls the image first when the engine doesn't have it ("Image is not cached" / "No such image").
  • RuntimeCreateContainer is unchanged for the Vue frontend.

Image icons: each row shows a symbol and colour for well-known images (postgres, redis, node, nginx, mysql, mongo, python, go, …), with the running dot on its corner. Unknown images keep a plain box.

Checked

  • go test -race and swift test, including new tests:
    • the event stream over a unix socket;
    • image-name parsing and icon choice;
    • the create request's JSON against the Go struct.
  • Against the running engine, DOCKIVA_LIVE=1 go test -run TestLiveCreateContainer:
    1. busybox was removed first;
    2. the create path pulled it;
    3. it created the container with an env var and a published port, started it, inspected it and removed it.
  • The engine's /events answers on the app's socket with its token.

Not checked

  • The UI on screen: it builds, but no screenshot was taken.
  • Other runtimes: containerd runtimes ignore Env. The Docker runtime doesn't implement create, so the sheet reports an error there.
  • Real logos: the icons are SF Symbols in brand colours, not the projects' logos.

The core watched `docker events` on the docker CLI's current context, so with
Dockiva Engine selected it heard another daemon (OrbStack here) and the app never
refreshed for containers started outside it, such as CI runner containers.

With Dockiva Engine selected, the core now streams the engine's GET /events over
engine.sock, reconnects when the engine restarts, and asks for one refresh on each
(re)connect for events missed meanwhile. Other runtimes keep `docker events`. The
watch switches when the user selects another runtime.
The native app had no way to create a container. A + button beside the
Containers title opens a sheet like docker run -d: image, name, published TCP
ports (127.0.0.1), environment variables, an optional command, and whether to
start it. Templates fill in PostgreSQL, Redis, MySQL, MongoDB, Nginx and
Node.js. The core's new DockerService.CreateContainer takes the whole request,
passes Env to Dockiva Engine, and pulls the image first when the engine does
not have it ("Image is not cached" / "No such image").

Each container row shows an icon for its image (postgres, redis, node, nginx,
mysql, mongo, python, go, …) with the running dot on its corner; unknown images
keep a plain box.

Checked: go test -race; swift test (image-name parsing, icon choice, and the
request JSON against the Go struct); and against the running engine,
DOCKIVA_LIVE=1 go test -run TestLiveCreateContainer: busybox removed first, so
the sheet's path pulled it, created it with an env var and a published port,
started it and removed it.
@chandarith-chea
chandarith-chea merged commit 46674de into main Nov 10, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant