Repository navigation
Containers: live list on Dockiva Engine, New container sheet, image icons - #65
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
docker eventson the docker CLI's current context. On this Mac that is OrbStack, so with Dockiva Engine selected the app heard another daemon.Change
The list follows Dockiva Engine's events (aea1ffa)
GET /eventsoverengine.sock.docker events. The watch switches when the user selects another runtime.New container sheet (6894d44): a + beside the Containers title, like
docker run -d.DockerService.CreateContainer(request).Envto Dockiva Engine.RuntimeCreateContaineris 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 -raceandswift test, including new tests:DOCKIVA_LIVE=1 go test -run TestLiveCreateContainer:/eventsanswers on the app's socket with its token.Not checked
Env. The Docker runtime doesn't implement create, so the sheet reports an error there.