Allow setting a one-off container name

Signed-off-by: Daniel Nephin <dnephin@gmail.com>
This commit is contained in:
Daniel Nephin 2015-08-26 13:33:03 -04:00
commit d2718bed99
5 changed files with 32 additions and 1 deletions

View file

@ -308,6 +308,7 @@ class TopLevelCommand(Command):
--allow-insecure-ssl Deprecated - no effect.
-d Detached mode: Run container in the background, print
new container name.
--name NAME Assign a name to the container
--entrypoint CMD Override the entrypoint of the image.
-e KEY=VAL Set an environment variable (can be used multiple times)
-u, --user="" Run as specified username or uid
@ -374,6 +375,9 @@ class TopLevelCommand(Command):
'can not be used togather'
)
if options['--name']:
container_options['name'] = options['--name']
try:
container = service.create_container(
quiet=True,