diff --git a/python_docker.py b/python_docker.py index aa005ea..5a1bdc3 100644 --- a/python_docker.py +++ b/python_docker.py @@ -9,10 +9,10 @@ import docker def show_docker_con_img(input): output_list = [] client = docker.from_env() - if input == "images": + if str(input) == "images": search_query = "RepoTags" - test = 'client.' + input + '.list(all=True)' - if input == "containers": + test = 'client.' + input + '.list(all=False)' + elif input == "containers": search_query = "Id" test = 'client.' + input + '.list(all=True)' else: