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

Function getComposeOptions

cmd/nerdctl/compose/compose.go:72–111  ·  view source on GitHub ↗
(cmd *cobra.Command, debugFull, experimental bool)

Source from the content-addressed store, hash-verified

70}
71
72func getComposeOptions(cmd *cobra.Command, debugFull, experimental bool) (composer.Options, error) {
73 nerdctlCmd, nerdctlArgs := helpers.GlobalFlags(cmd)
74 projectDirectory, err := cmd.Flags().GetString("project-directory")
75 if err != nil {
76 return composer.Options{}, err
77 }
78 envFile, err := cmd.Flags().GetString("env-file")
79 if err != nil {
80 return composer.Options{}, err
81 }
82 projectName, err := cmd.Flags().GetString("project-name")
83 if err != nil {
84 return composer.Options{}, err
85 }
86 files, err := cmd.Flags().GetStringArray("file")
87 if err != nil {
88 return composer.Options{}, err
89 }
90 ipfsAddressStr, err := cmd.Flags().GetString("ipfs-address")
91 if err != nil {
92 return composer.Options{}, err
93 }
94 profiles, err := cmd.Flags().GetStringArray("profile")
95 if err != nil {
96 return composer.Options{}, err
97 }
98
99 return composer.Options{
100 Project: projectName,
101 ProjectDirectory: projectDirectory,
102 ConfigPaths: files,
103 Profiles: profiles,
104 EnvFile: envFile,
105 NerdctlCmd: nerdctlCmd,
106 NerdctlArgs: nerdctlArgs,
107 DebugPrintFull: debugFull,
108 Experimental: experimental,
109 IPFSAddress: ipfsAddressStr,
110 }, nil
111}

Callers 15

logsActionFunction · 0.85
upActionFunction · 0.85
psActionFunction · 0.85
imagesActionFunction · 0.85
configActionFunction · 0.85
pullActionFunction · 0.85
pushActionFunction · 0.85
runActionFunction · 0.85
stopActionFunction · 0.85
downActionFunction · 0.85
execActionFunction · 0.85
copyActionFunction · 0.85

Calls 1

GlobalFlagsFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…