extensions-sdk icon indicating copy to clipboard operation
extensions-sdk copied to clipboard

Ability to view extension-launched containers

Open mikesir87 opened this issue 3 years ago • 3 comments

Is your feature request related to a problem? Please describe.

When extensions launch containers using the extensions SDK, additional labels are added to associate the new container with the extension. When a user has the setting Show Docker Extensions system containers disabled (which is set by default), the list of running containers then hides these containers. Therefore, it's impossible for an extension to be able to keep track of what containers is has launched.

Describe the solution you'd like

There are a few possible ideas:

  1. Provide the ability for listContainers to include the containers belonging to the requesting extension, even if the setting is currently set to hide them.
  2. Add a new method to list extension-launched containers (to not pollute the listContainers results).
  3. Provide an option on whether the additional labels are added to extension-launched containers. This could be helpful in the case an extension wants to launch containers that should be viewable in the dashboard/CLI.

mikesir87 avatar Nov 11 '22 19:11 mikesir87

I also think this is an important feature that's missing in the current SDK. This poses an issue for any Docker Extension that might require updates on the current status of a container.

I've been working on an Extension that uses the docker run command to create a running container based on options specified from a user's input. Because system containers are not viewable using any of the provided APIs, I've been unable to keep track of the launched container's status.

versilis avatar Nov 23 '22 20:11 versilis

Thanks for the feedback. We might provide ways to distinguish between hide extension containers and hide containers dynamically created by extensions. As a workaround for now, if you name your container (or get the name out of the docker run stdout), you should be able to inspect them using their name, even though they are not listed with docker ps or listContainers()

gtardif avatar Feb 21 '23 11:02 gtardif