mirror of
https://github.com/containers/podman.git
synced 2025-10-17 19:24:04 +08:00
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>
This commit is contained in:
@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user