diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-05-08 17:57:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-08 17:57:10 +0200 |
commit | 13db0f2b61b17e6f959fff832b40270352cd54da (patch) | |
tree | ab1c4ca5ea7926e0731136bb4e358c6d3407f8da /pkg/specgen/generate | |
parent | 2547fe53127057ce8f3ba065b4263fea32be7f0d (diff) | |
parent | 20407a2f1fadb1488caac1560dfdd56facff4153 (diff) | |
download | podman-13db0f2b61b17e6f959fff832b40270352cd54da.tar.gz podman-13db0f2b61b17e6f959fff832b40270352cd54da.tar.bz2 podman-13db0f2b61b17e6f959fff832b40270352cd54da.zip |
Merge pull request #6118 from baude/v2bindingsenforce
set binding tests to required
Diffstat (limited to 'pkg/specgen/generate')
-rw-r--r-- | pkg/specgen/generate/container.go | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/pkg/specgen/generate/container.go b/pkg/specgen/generate/container.go index e4bd2991a..a217125f4 100644 --- a/pkg/specgen/generate/container.go +++ b/pkg/specgen/generate/container.go @@ -42,11 +42,13 @@ func CompleteSpec(ctx context.Context, r *libpod.Runtime, s *specgen.SpecGenerat if err != nil { return err } - sig, err := signal.ParseSignalNameOrNumber(stopSignal) - if err != nil { - return err + if stopSignal != "" { + sig, err := signal.ParseSignalNameOrNumber(stopSignal) + if err != nil { + return err + } + s.StopSignal = &sig } - s.StopSignal = &sig } rtc, err := r.GetConfig() @@ -78,6 +80,9 @@ func CompleteSpec(ctx context.Context, r *libpod.Runtime, s *specgen.SpecGenerat } // labels from the image that dont exist already + if len(labels) > 0 && s.Labels == nil { + s.Labels = make(map[string]string) + } for k, v := range labels { if _, exists := s.Labels[k]; !exists { s.Labels[k] = v |