docker-explorer icon indicating copy to clipboard operation
docker-explorer copied to clipboard

Issue with "list all_containers"

Open chaoticmachinery opened this issue 2 years ago • 0 comments

Ran the following using the "list all_containers":

python3 /usr/local/bin/de.py -r /mnt/flash/drive/var/lib/docker list all_containers

Traceback (most recent call last):
  File "/usr/local/bin/de.py", line 275, in <module>
    DockerExplorerTool().Main()
  File "/usr/local/bin/de.py", line 264, in Main
    self.ShowContainers()
  File "/usr/local/bin/de.py", line 180, in ShowContainers
    self._explorer.GetContainersJson(
  File "/usr/local/lib/python3.11/site-packages/docker_explorer/explorer.py", line 197, in GetContainersJson
    for container_object in self.GetContainersList(
                            ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/docker_explorer/explorer.py", line 175, in GetContainersList
    self.GetAllContainers(), key=lambda x: x.start_timestamp)
    ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/docker_explorer/explorer.py", line 157, in GetAllContainers
    containers_list.append(self.GetContainer(cid))
                           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/docker_explorer/explorer.py", line 132, in GetContainer
    return container.Container(
           ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/docker_explorer/container.py", line 157, in __init__
    with open(mount_id_path, encoding='utf-8') as mount_id_file:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/mnt/flash/drive/var/lib/docker/image/overlay2/layerdb/mounts/a66cc9e9a56b8c77c59096536fde76943cd7f608faac99c9bec3ff4dc57a022f/mount-id'

Looking at the error, I can confirm there is not a directory called "/mnt/flash/drive/var/lib/docker/image/overlay2/layerdb/mounts/a66cc9e9a56b8c77c59096536fde76943cd7f608faac99c9bec3ff4dc57a022f". Would you be able to have the tool produce an error message and then move on to the next item?

chaoticmachinery avatar Mar 06 '23 15:03 chaoticmachinery