summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd/podman/common/specgen.go4
-rw-r--r--cmd/podman/images/search.go3
-rw-r--r--pkg/specgen/generate/oci.go18
3 files changed, 9 insertions, 16 deletions
diff --git a/cmd/podman/common/specgen.go b/cmd/podman/common/specgen.go
index ff7c39de2..664e66df8 100644
--- a/cmd/podman/common/specgen.go
+++ b/cmd/podman/common/specgen.go
@@ -519,6 +519,10 @@ func FillOutSpecGen(s *specgen.SpecGenerator, c *ContainerCLIOpts, args []string
}
s.Sysctl = sysmap
+ if c.CIDFile != "" {
+ s.Annotations[define.InspectAnnotationCIDFile] = c.CIDFile
+ }
+
for _, opt := range c.SecurityOpt {
if opt == "no-new-privileges" {
s.ContainerSecurityConfig.NoNewPrivileges = true
diff --git a/cmd/podman/images/search.go b/cmd/podman/images/search.go
index 640d497c3..ccac7e3fe 100644
--- a/cmd/podman/images/search.go
+++ b/cmd/podman/images/search.go
@@ -38,9 +38,6 @@ var (
Long: searchDescription,
RunE: imageSearch,
Args: cobra.ExactArgs(1),
- Annotations: map[string]string{
- registry.ParentNSRequired: "",
- },
Example: `podman search --filter=is-official --limit 3 alpine
podman search registry.fedoraproject.org/ # only works with v2 registries
podman search --format "table {{.Index}} {{.Name}}" registry.fedoraproject.org/fedora`,
diff --git a/pkg/specgen/generate/oci.go b/pkg/specgen/generate/oci.go
index a2bb66a44..11b18e2d0 100644
--- a/pkg/specgen/generate/oci.go
+++ b/pkg/specgen/generate/oci.go
@@ -321,12 +321,6 @@ func SpecGenToOCI(ctx context.Context, s *specgen.SpecGenerator, rt *libpod.Runt
configSpec.Annotations = make(map[string]string)
}
- // TODO cidfile is not in specgen; when wiring up cli, we will need to move this out of here
- // leaving as a reminder
- //if config.CidFile != "" {
- // configSpec.Annotations[libpod.InspectAnnotationCIDFile] = config.CidFile
- //}
-
if s.Remove {
configSpec.Annotations[define.InspectAnnotationAutoremove] = define.InspectResponseTrue
} else {
@@ -343,13 +337,11 @@ func SpecGenToOCI(ctx context.Context, s *specgen.SpecGenerator, rt *libpod.Runt
configSpec.Annotations[define.InspectAnnotationPrivileged] = define.InspectResponseFalse
}
- // TODO Init might not make it into the specgen and therefore is not available here. We should deal
- // with this when we wire up the CLI; leaving as a reminder
- //if s.Init {
- // configSpec.Annotations[libpod.InspectAnnotationInit] = libpod.InspectResponseTrue
- //} else {
- // configSpec.Annotations[libpod.InspectAnnotationInit] = libpod.InspectResponseFalse
- //}
+ if s.Init {
+ configSpec.Annotations[define.InspectAnnotationInit] = define.InspectResponseTrue
+ } else {
+ configSpec.Annotations[define.InspectAnnotationInit] = define.InspectResponseFalse
+ }
return configSpec, nil
}