diff options
author | Matthew Heon <matthew.heon@gmail.com> | 2017-11-29 16:58:55 -0500 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2017-11-30 02:03:23 +0000 |
commit | 1f9c8942f1c384db6cf4093eeccfdd80d5ef6c3f (patch) | |
tree | 27a67b82745172a59fd0e4c61f57967b0f1b496a /libpod/container.go | |
parent | 742475885eee9a21232f24aa7528eb5e0022a42f (diff) | |
download | podman-1f9c8942f1c384db6cf4093eeccfdd80d5ef6c3f.tar.gz podman-1f9c8942f1c384db6cf4093eeccfdd80d5ef6c3f.tar.bz2 podman-1f9c8942f1c384db6cf4093eeccfdd80d5ef6c3f.zip |
Add randomly generates container names
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
Closes: #88
Approved by: baude
Diffstat (limited to 'libpod/container.go')
-rw-r--r-- | libpod/container.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libpod/container.go b/libpod/container.go index aa80fb4a5..e69037353 100644 --- a/libpod/container.go +++ b/libpod/container.go @@ -12,6 +12,7 @@ import ( "github.com/containers/storage" "github.com/containers/storage/pkg/archive" + "github.com/docker/docker/pkg/namesgenerator" "github.com/docker/docker/pkg/stringid" "github.com/docker/docker/pkg/term" spec "github.com/opencontainers/runtime-spec/specs-go" @@ -329,7 +330,7 @@ func newContainer(rspec *spec.Spec) (*Container, error) { ctr.state = new(containerRuntimeInfo) ctr.config.ID = stringid.GenerateNonCryptoID() - ctr.config.Name = ctr.config.ID // TODO generate unique human-readable names + ctr.config.Name = namesgenerator.GetRandomName(0) ctr.config.Spec = new(spec.Spec) deepcopier.Copy(rspec).To(ctr.config.Spec) |