mirror of
https://github.com/docker/compose.git
synced 2026-05-13 13:58:02 +00:00
add USER_AGENT variable to cmd when shellouting
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
This commit is contained in:
parent
69f1430a49
commit
4bbc6c609f
1 changed files with 2 additions and 0 deletions
|
|
@ -23,6 +23,7 @@ import (
|
|||
"github.com/compose-spec/compose-go/v2/types"
|
||||
"github.com/docker/cli/cli-plugins/manager"
|
||||
"github.com/docker/cli/cli/context/docker"
|
||||
"github.com/docker/compose/v2/internal"
|
||||
"go.opentelemetry.io/otel"
|
||||
"go.opentelemetry.io/otel/propagation"
|
||||
)
|
||||
|
|
@ -41,6 +42,7 @@ func (s *composeService) prepareShellOut(gctx context.Context, project *types.Pr
|
|||
env.Merge(types.Mapping(carrier))
|
||||
|
||||
env["DOCKER_CONTEXT"] = s.dockerCli.CurrentContext()
|
||||
env["USER_AGENT"] = "compose/" + internal.Version
|
||||
|
||||
metadata, err := s.dockerCli.ContextStore().GetMetadata(s.dockerCli.CurrentContext())
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue