We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fd621e2 commit 887d698Copy full SHA for 887d698
cmd/docker-mcp/internal/docker/client.go
@@ -10,6 +10,7 @@ import (
10
"github.com/docker/docker/api/types/network"
11
"github.com/docker/docker/api/types/volume"
12
"github.com/docker/docker/client"
13
+ "github.com/docker/mcp-gateway/cmd/docker-mcp/version"
14
)
15
16
type Client interface {
@@ -38,6 +39,13 @@ type dockerClient struct {
38
39
func NewClient(cli command.Cli) Client {
40
return &dockerClient{
41
apiClient: sync.OnceValue(func() client.APIClient {
42
+ _ = cli.Apply(func(cli *command.DockerCli) error {
43
+ if mobyClient, ok := cli.Client().(*client.Client); ok {
44
+ _ = client.WithUserAgent("mcp/" + version.Version)(mobyClient)
45
+ }
46
+ return nil
47
+ })
48
+
49
return cli.Client()
50
}),
51
}
0 commit comments