Update and add stuff
This commit is contained in:
parent
0ac3c44f4a
commit
5caef40378
1 changed files with 12 additions and 1 deletions
|
@ -58,7 +58,7 @@ class Docker:
|
||||||
|
|
||||||
return containers
|
return containers
|
||||||
|
|
||||||
def container_info(raw_info=getoutput('docker container list')):
|
def all_containers_info(raw_info=getoutput('docker container list')):
|
||||||
"""
|
"""
|
||||||
Gets info about all the Docker containers
|
Gets info about all the Docker containers
|
||||||
:return: Nested dict of containers info
|
:return: Nested dict of containers info
|
||||||
|
@ -94,6 +94,17 @@ class Docker:
|
||||||
raw_info.split('\n')[i][start_i:end_i].strip()
|
raw_info.split('\n')[i][start_i:end_i].strip()
|
||||||
|
|
||||||
return info
|
return info
|
||||||
|
|
||||||
|
def container_info(container):
|
||||||
|
"""
|
||||||
|
Returns the info about a given container
|
||||||
|
:parameters:
|
||||||
|
container: The container you want info about
|
||||||
|
|
||||||
|
:returns:
|
||||||
|
dict: The info about the container
|
||||||
|
"""
|
||||||
|
return Docker.all_containers_info()[container]
|
||||||
|
|
||||||
def compose(dir):
|
def compose(dir):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in a new issue