summaryrefslogtreecommitdiff
path: root/pkg/specgen
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2020-02-26 11:09:19 +0100
committerGiuseppe Scrivano <gscrivan@redhat.com>2020-02-26 15:04:31 +0100
commit418dee100b9029bbc44141138bc3d03a66da4a99 (patch)
tree8de794ee1a2084820fdcbfdadc13c8761b46a39b /pkg/specgen
parentdd289950de604d0e4a1ecf9833d9c56311e06d1d (diff)
downloadpodman-418dee100b9029bbc44141138bc3d03a66da4a99.tar.gz
podman-418dee100b9029bbc44141138bc3d03a66da4a99.tar.bz2
podman-418dee100b9029bbc44141138bc3d03a66da4a99.zip
spec: allow container alias name in lookup
Previously --uts=container: expected the full container ID. Closes: https://github.com/containers/libpod/issues/5289 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'pkg/specgen')
-rw-r--r--pkg/specgen/namespaces.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/specgen/namespaces.go b/pkg/specgen/namespaces.go
index 025cb31e0..17b180cde 100644
--- a/pkg/specgen/namespaces.go
+++ b/pkg/specgen/namespaces.go
@@ -276,7 +276,7 @@ func (s *SpecGenerator) utsConfigureGenerator(g *generate.Generator, runtime *li
if hostname == "" {
switch {
case s.UtsNS.IsContainer():
- utsCtr, err := runtime.GetContainer(s.UtsNS.Value)
+ utsCtr, err := runtime.LookupContainer(s.UtsNS.Value)
if err != nil {
return errors.Wrapf(err, "unable to retrieve hostname from dependency container %s", s.UtsNS.Value)
}