Add command for Docker-style version information

This adds a command 'version' to show software versions information
like Docker does. In addition it includes:
- version of the docker-py-package
- Python-implementation and -version

Signed-off-by: Frank Sachsenheim <funkyfuture@riseup.net>
This commit is contained in:
funkyfuture 2015-01-25 00:16:37 +01:00 committed by Frank Sachsenheim
commit ae9d619d86
3 changed files with 35 additions and 6 deletions

View file

@ -48,7 +48,7 @@ class Command(DocoptCommand):
raise errors.ConnectionErrorGeneric(self.get_client().base_url)
def perform_command(self, options, handler, command_options):
if options['COMMAND'] == 'help':
if options['COMMAND'] in ('help', 'version'):
# Skip looking up the compose file.
handler(None, command_options)
return