Merge pull request #1779 from AkihiroSuda/resolve-util-bin

shim: support non-default binary name
This commit is contained in:
Michael Crosby
2017-11-17 17:53:43 -05:00
committed by GitHub
2 changed files with 18 additions and 9 deletions

View File

@@ -89,10 +89,15 @@ func WithStart(binary, address, daemonAddress, cgroup string, nonewns, debug boo
}
func newCommand(binary, daemonAddress string, nonewns, debug bool, config shim.Config, socket *os.File) *exec.Cmd {
selfExe, err := os.Executable()
if err != nil {
panic(err)
}
args := []string{
"-namespace", config.Namespace,
"-workdir", config.WorkDir,
"-address", daemonAddress,
"-containerd-binary", selfExe,
}
if config.Criu != "" {