summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md2
-rw-r--r--cmd/podman/system/service_abi.go11
-rw-r--r--pkg/api/handlers/compat/images_search.go16
3 files changed, 27 insertions, 2 deletions
diff --git a/README.md b/README.md
index 3c25e53cb..bb8edcca4 100644
--- a/README.md
+++ b/README.md
@@ -5,7 +5,7 @@
Podman (the POD MANager) is a tool for managing containers and images, volumes mounted into those containers, and pods made from groups of containers.
Podman is based on libpod, a library for container lifecycle management that is also contained in this repository. The libpod library provides APIs for managing containers, pods, container images, and volumes.
-* [Latest Version: 2.2.0](https://github.com/containers/podman/releases/latest)
+* [Latest Version: 2.2.1](https://github.com/containers/podman/releases/latest)
* Latest Remote client for Windows
* Latest Remote client for MacOs
* Latest Static Remote client for Linux
diff --git a/cmd/podman/system/service_abi.go b/cmd/podman/system/service_abi.go
index 8c52616be..ed35fbb04 100644
--- a/cmd/podman/system/service_abi.go
+++ b/cmd/podman/system/service_abi.go
@@ -5,6 +5,7 @@ package system
import (
"context"
"net"
+ "os"
"strings"
api "github.com/containers/podman/v2/pkg/api/server"
@@ -13,6 +14,7 @@ import (
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/spf13/pflag"
+ "golang.org/x/sys/unix"
)
func restService(opts entities.ServiceOptions, flags *pflag.FlagSet, cfg *entities.PodmanConfig) error {
@@ -34,6 +36,15 @@ func restService(opts entities.ServiceOptions, flags *pflag.FlagSet, cfg *entiti
listener = &l
}
+ // Close stdin, so shortnames will not prompt
+ devNullfile, err := os.Open(os.DevNull)
+ if err != nil {
+ return err
+ }
+ defer devNullfile.Close()
+ if err := unix.Dup2(int(devNullfile.Fd()), int(os.Stdin.Fd())); err != nil {
+ return err
+ }
rt, err := infra.GetRuntime(context.Background(), flags, cfg)
if err != nil {
return err
diff --git a/pkg/api/handlers/compat/images_search.go b/pkg/api/handlers/compat/images_search.go
index b3ceae3ee..6808cdad5 100644
--- a/pkg/api/handlers/compat/images_search.go
+++ b/pkg/api/handlers/compat/images_search.go
@@ -8,6 +8,7 @@ import (
"github.com/containers/podman/v2/libpod/image"
"github.com/containers/podman/v2/pkg/api/handlers/utils"
"github.com/containers/podman/v2/pkg/auth"
+ "github.com/docker/docker/api/types/registry"
"github.com/gorilla/schema"
"github.com/pkg/errors"
)
@@ -77,5 +78,18 @@ func SearchImages(w http.ResponseWriter, r *http.Request) {
utils.BadRequest(w, "term", query.Term, err)
return
}
- utils.WriteResponse(w, http.StatusOK, results)
+
+ compatResults := make([]registry.SearchResult, 0, len(results))
+ for _, result := range results {
+ compatResult := registry.SearchResult{
+ Name: result.Name,
+ Description: result.Description,
+ StarCount: result.Stars,
+ IsAutomated: result.Automated == "[OK]",
+ IsOfficial: result.Official == "[OK]",
+ }
+ compatResults = append(compatResults, compatResult)
+ }
+
+ utils.WriteResponse(w, http.StatusOK, compatResults)
}