diff options
Diffstat (limited to 'libpod/runtime_pod.go')
-rw-r--r-- | libpod/runtime_pod.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libpod/runtime_pod.go b/libpod/runtime_pod.go index 3619a7a82..44910b180 100644 --- a/libpod/runtime_pod.go +++ b/libpod/runtime_pod.go @@ -35,6 +35,14 @@ func (r *Runtime) NewPod(options ...PodCreateOption) (*Pod, error) { } } + if pod.config.Name == "" { + name, err := r.generateName() + if err != nil { + return nil, err + } + pod.config.Name = name + } + pod.valid = true if err := r.state.AddPod(pod); err != nil { |