make docker compile on freebsd
Signed-off-by: Alexey Guskov <lexag@mail.ru>
This commit is contained in:
parent
0dc55c7057
commit
4e30080c64
8 changed files with 79 additions and 4 deletions
23
reexec/command_freebsd.go
Normal file
23
reexec/command_freebsd.go
Normal file
|
@ -0,0 +1,23 @@
|
|||
// +build freebsd
|
||||
|
||||
package reexec
|
||||
|
||||
import (
|
||||
"os/exec"
|
||||
)
|
||||
|
||||
// Self returns the path to the current process's binary.
|
||||
// Uses os.Args[0].
|
||||
func Self() string {
|
||||
return naiveSelf()
|
||||
}
|
||||
|
||||
// Command returns *exec.Cmd which have Path as current binary.
|
||||
// For example if current binary is "docker" at "/usr/bin/", then cmd.Path will
|
||||
// be set to "/usr/bin/docker".
|
||||
func Command(args ...string) *exec.Cmd {
|
||||
return &exec.Cmd{
|
||||
Path: Self(),
|
||||
Args: args,
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue