summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/main.go11
-rw-r--r--cmd/podman/search.go5
2 files changed, 16 insertions, 0 deletions
diff --git a/cmd/podman/main.go b/cmd/podman/main.go
index 8d470e10d..a532bc26e 100644
--- a/cmd/podman/main.go
+++ b/cmd/podman/main.go
@@ -138,6 +138,17 @@ func main() {
logrus.SetLevel(level)
}
+ // Only if not rootless, set rlimits for open files.
+ // We open numerous FDs for ports opened
+ if !rootless.IsRootless() {
+ rlimits := new(syscall.Rlimit)
+ rlimits.Cur = 1048576
+ rlimits.Max = 1048576
+ if err := syscall.Setrlimit(syscall.RLIMIT_NOFILE, rlimits); err != nil {
+ return errors.Wrapf(err, "error setting new rlimits")
+ }
+ }
+
if logLevel == "debug" {
debug = true
diff --git a/cmd/podman/search.go b/cmd/podman/search.go
index 009ff8ba9..f64b822fc 100644
--- a/cmd/podman/search.go
+++ b/cmd/podman/search.go
@@ -345,6 +345,11 @@ func matchesOfficialFilter(filter searchFilterParams, result docker.SearchResult
}
func getRegistry(image string) (string, error) {
+ // It is possible to only have the registry name in the format "myregistry/"
+ // if so, just trim the "/" from the end and return the registry name
+ if strings.HasSuffix(image, "/") {
+ return strings.TrimSuffix(image, "/"), nil
+ }
imgRef, err := reference.Parse(image)
if err != nil {
return "", err