MCPcopy
hub / github.com/docker/compose / runPush

Function runPush

cmd/compose/push.go:57–79  ·  cmd/compose/push.go::runPush
(ctx context.Context, dockerCli command.Cli, backendOptions *BackendOptions, opts pushOptions, services []string)

Source from the content-addressed store, hash-verified

55}
56
57func runPush(ctx context.Context, dockerCli command.Cli, backendOptions *BackendOptions, opts pushOptions, services []string) error {
58 backend, err := compose.NewComposeService(dockerCli, backendOptions.Options...)
59 if err != nil {
60 return err
61 }
62
63 project, _, err := opts.ToProject(ctx, dockerCli, backend, services)
64 if err != nil {
65 return err
66 }
67
68 if !opts.IncludeDeps {
69 project, err = project.WithSelectedServices(services, types.IgnoreDependencies)
70 if err != nil {
71 return err
72 }
73 }
74
75 return backend.Push(ctx, project, api.PushOptions{
76 IgnoreFailures: opts.Ignorefailures,
77 Quiet: opts.Quiet,
78 })
79}

Callers 1

pushCommandFunction · 0.85

Calls 3

NewComposeServiceFunction · 0.92
PushMethod · 0.65
ToProjectMethod · 0.45

Tested by

no test coverage detected