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

Function runCommit

cmd/compose/commit.go:78–97  ·  view source on GitHub ↗
(ctx context.Context, dockerCli command.Cli, backendOptions *BackendOptions, options commitOptions)

Source from the content-addressed store, hash-verified

76}
77
78func runCommit(ctx context.Context, dockerCli command.Cli, backendOptions *BackendOptions, options commitOptions) error {
79 projectName, err := options.toProjectName(ctx, dockerCli)
80 if err != nil {
81 return err
82 }
83
84 backend, err := compose.NewComposeService(dockerCli, backendOptions.Options...)
85 if err != nil {
86 return err
87 }
88 return backend.Commit(ctx, projectName, api.CommitOptions{
89 Service: options.service,
90 Reference: options.reference,
91 Pause: options.pause,
92 Comment: options.comment,
93 Author: options.author,
94 Changes: options.changes,
95 Index: options.index,
96 })
97}

Callers 1

commitCommandFunction · 0.85

Calls 3

NewComposeServiceFunction · 0.92
toProjectNameMethod · 0.80
CommitMethod · 0.65

Tested by

no test coverage detected