NewNerdctlCmdCreator returns a NerdctlCmdCreator that creates nerdctl commands. In "remote" mode, it uses limactl commands, configured to use binaries at lima-related paths and then executes nerdctl. In "native" mode, it directly executes nerdctl from the user's PATH.
( cmdCreator Creator, logger flog.Logger, nerdctlConfigPath string, buildkitSocketPath string, binPath string, systemDeps NerdctlCmdCreatorSystemDeps, )
| 35 | // In "remote" mode, it uses limactl commands, configured to use binaries at lima-related paths and then executes nerdctl. |
| 36 | // In "native" mode, it directly executes nerdctl from the user's PATH. |
| 37 | func NewNerdctlCmdCreator( |
| 38 | cmdCreator Creator, |
| 39 | logger flog.Logger, |
| 40 | nerdctlConfigPath string, |
| 41 | buildkitSocketPath string, |
| 42 | binPath string, |
| 43 | systemDeps NerdctlCmdCreatorSystemDeps, |
| 44 | ) NerdctlCmdCreator { |
| 45 | return &nerdctlCmdCreator{ |
| 46 | cmdCreator: cmdCreator, |
| 47 | logger: logger, |
| 48 | nerdctlConfigPath: nerdctlConfigPath, |
| 49 | buildkitSocketPath: buildkitSocketPath, |
| 50 | binPath: binPath, |
| 51 | systemDeps: systemDeps, |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | func (ncc *nerdctlCmdCreator) create(stdin io.Reader, stdout, stderr io.Writer, args ...string) Command { |
| 56 | ncc.logger.Debugf("Creating nerdctl command: ARGUMENTS: %v", args) |
no outgoing calls