enable podman-remote on windows

build a podman-remote binary for windows that allows users to use the
remote client on windows and interact with podman on linux system.

Signed-off-by: baude <bbaude@redhat.com>
This commit is contained in:
baude
2019-04-22 16:01:31 -05:00
parent b5af10ce5a
commit 0b6bb6a3d3
38 changed files with 3020 additions and 2820 deletions

View File

@ -0,0 +1,20 @@
// +build linux darwin
package parse
import (
"fmt"
"golang.org/x/sys/unix"
)
func getDefaultProcessLimits() []string {
rlim := unix.Rlimit{Cur: 1048576, Max: 1048576}
defaultLimits := []string{}
if err := unix.Setrlimit(unix.RLIMIT_NOFILE, &rlim); err == nil {
defaultLimits = append(defaultLimits, fmt.Sprintf("nofile=%d:%d", rlim.Cur, rlim.Max))
}
if err := unix.Setrlimit(unix.RLIMIT_NPROC, &rlim); err == nil {
defaultLimits = append(defaultLimits, fmt.Sprintf("nproc=%d:%d", rlim.Cur, rlim.Max))
}
return defaultLimits
}