Get the Docker Engine to build clean on Solaris
Signed-off-by: Amit Krishnan <krish.amit@gmail.com>
This commit is contained in:
parent
d97f6ab5f1
commit
a531a67461
23 changed files with 495 additions and 27 deletions
|
@ -1,15 +0,0 @@
|
|||
package platform
|
||||
|
||||
import (
|
||||
"os/exec"
|
||||
)
|
||||
|
||||
// runtimeArchitecture gets the name of the current architecture (x86, x86_64, …)
|
||||
func runtimeArchitecture() (string, error) {
|
||||
cmd := exec.Command("uname", "-m")
|
||||
machine, err := cmd.Output()
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return string(machine), nil
|
||||
}
|
18
platform/architecture_unix.go
Normal file
18
platform/architecture_unix.go
Normal file
|
@ -0,0 +1,18 @@
|
|||
// +build freebsd solaris
|
||||
|
||||
package platform
|
||||
|
||||
import (
|
||||
"os/exec"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// runtimeArchitecture get the name of the current architecture (i86pc, sun4v)
|
||||
func runtimeArchitecture() (string, error) {
|
||||
cmd := exec.Command("/usr/bin/uname", "-m")
|
||||
machine, err := cmd.Output()
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return strings.TrimSpace(string(machine)), nil
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue