Is there an equivalent to “Docker context ls” with the Moby/Docker API in Go? [closed]

1 week ago 9
ARTICLE AD BOX

To learn Go, I would like to create a personal application for managing Docker objects. I have two Docker contexts on my machine. When starting the program, I would like to be able to choose which context to use to display containers, images, etc. In the command line, you can list the contexts with “docker context ls”.

I searched for “[moby] context list” or “[moby] context” without success.

If possible, how can I obtain the equivalent result of this command with the Moby/Docker API?

Any solutions? Any ideas? Any links?

Read Entire Article