MCPcopy Create free account
hub / github.com/containerd/nerdctl / pruneOptions

Function pruneOptions

cmd/nerdctl/builder/builder.go:104–132  ·  view source on GitHub ↗
(cmd *cobra.Command)

Source from the content-addressed store, hash-verified

102}
103
104func pruneOptions(cmd *cobra.Command) (types.BuilderPruneOptions, error) {
105 globalOptions, err := helpers.ProcessRootCmdFlags(cmd)
106 if err != nil {
107 return types.BuilderPruneOptions{}, err
108 }
109
110 buildkitHost, err := GetBuildkitHost(cmd, globalOptions.Namespace)
111 if err != nil {
112 return types.BuilderPruneOptions{}, err
113 }
114
115 all, err := cmd.Flags().GetBool("all")
116 if err != nil {
117 return types.BuilderPruneOptions{}, err
118 }
119
120 force, err := cmd.Flags().GetBool("force")
121 if err != nil {
122 return types.BuilderPruneOptions{}, err
123 }
124
125 return types.BuilderPruneOptions{
126 Stderr: cmd.OutOrStderr(),
127 GOptions: globalOptions,
128 BuildKitHost: buildkitHost,
129 All: all,
130 Force: force,
131 }, nil
132}
133
134func debugCommand() *cobra.Command {
135 shortHelp := `Debug Dockerfile`

Callers 1

pruneActionFunction · 0.70

Calls 2

ProcessRootCmdFlagsFunction · 0.92
GetBuildkitHostFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…