Repository: gabrieldemarmiesse/python-on-whales (language: python)

Issue:
Error when running container with detach=False
Thanks for making this package available, really useful! I'm trying to run a container in detached mode but I'm getting an error. As the same code works with detach=False I think this is likely a bug. Here's an example with detach=False and then detach=True:

```
>>> from python_on_whales import docker
>>> docker.run("tensorflow/tensorflow:2.3.2-gpu", gpus="all", detach=False)
''
>>> docker.run("tensorflow/tensorflow:2.3.2-gpu", gpus="all", detach=True)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/pip/pipenvs/ml-UCgrIzmY/lib/python3.7/site-packages/python_on_whales/components/container.py", line 1625, in run
    return Container(self.client_config, run(full_cmd))
  File "/pip/pipenvs/ml-UCgrIzmY/lib/python3.7/site-packages/python_on_whales/components/container.py", line 338, in __init__
    super().__init__(client_config, "id", reference, is_immutable_id)
  File "/pip/pipenvs/ml-UCgrIzmY/lib/python3.7/site-packages/python_on_whales/client_config.py", line 149, in __init__
    self._fetch_and_parse_inspect_result(reference_or_id)
  File "/pip/pipenvs/ml-UCgrIzmY/lib/python3.7/site-packages/python_on_whales/client_config.py", line 204, in _fetch_and_parse_inspect_result
    return self._parse_json_object(json_object)
  File "/pip/pipenvs/ml-UCgrIzmY/lib/python3.7/site-packages/python_on_whales/components/container.py", line 355, in _parse_json_object
    return ContainerInspectResult.parse_obj(json_object)
  File "pydantic/main.py", line 520, in pydantic.main.BaseModel.parse_obj
  File "pydantic/main.py", line 362, in pydantic.main.BaseModel.__init__
pydantic.error_wrappers.ValidationError: 2 validation errors for ContainerInspectResult
HostConfig -> DeviceRequests -> 0 -> DeviceIDs
  none is not an allowed value (type=type_error.none.not_allowed)
HostConfig -> DeviceRequests -> 0 -> Capabilities -> 0
  str type expected (type=type_error.str)
```


Discussion / hints:
Thank you for the bug report, it's great! I'll work on it this afternoon. This is a bug in the parsing of the json result. It's going to be quick to fix.

Fix patch:
diff --git a/python_on_whales/components/container.py b/python_on_whales/components/container.py
index 08a7593d..8e4b7a8b 100644
--- a/python_on_whales/components/container.py
+++ b/python_on_whales/components/container.py
@@ -73,10 +73,10 @@ class ContainerDevice(DockerCamelModel):
 
 class ContainerDeviceRequest(DockerCamelModel):
     driver: str
-    count: str
-    device_ids: List[str]
-    capabilities: List[str]
-    options: Any
+    count: int
+    device_ids: Optional[List[str]] = pydantic.Field(alias="DeviceIDs")
+    capabilities: List[Any]
+    options: Dict[str, str]
 
 
 class ContainerUlimit(DockerCamelModel):


Test patch:
diff --git a/python_on_whales/test_utils.py b/python_on_whales/test_utils.py
index 32154613..6b20e55f 100644
--- a/python_on_whales/test_utils.py
+++ b/python_on_whales/test_utils.py
@@ -24,4 +24,4 @@ def get_all_jsons(object_types: str) -> List[Path]:
     jsons_directory = (
         PROJECT_ROOT / "tests/python_on_whales/components/jsons" / object_types
     )
-    return sorted(list(jsons_directory.iterdir()))
+    return sorted(list(jsons_directory.iterdir()), key=lambda x: int(x.stem))
diff --git a/tests/python_on_whales/components/jsons/containers/10.json b/tests/python_on_whales/components/jsons/containers/10.json
new file mode 100644
index 00000000..193d3d52
--- /dev/null
+++ b/tests/python_on_whales/components/jsons/containers/10.json
@@ -0,0 +1,217 @@
+{
+    "Id": "53f5dabd10ef466e9395d860e6b9ed1c20d0f1488ea7287d6dd6907f22de0974",
+    "Created": "2021-01-28T13:48:49.085725677Z",
+    "Path": "/bin/bash",
+    "Args": [],
+    "State": {
+        "Status": "exited",
+        "Running": false,
+        "Paused": false,
+        "Restarting": false,
+        "OOMKilled": false,
+        "Dead": false,
+        "Pid": 0,
+        "ExitCode": 0,
+        "Error": "",
+        "StartedAt": "2021-01-28T13:48:49.468180632Z",
+        "FinishedAt": "2021-01-28T13:48:49.493000039Z"
+    },
+    "Image": "sha256:d79ad2663f3912284ecc2e5348fd014087556c79555a0a9db8ea07ec7b259b09",
+    "ResolvConfPath": "/var/lib/docker/containers/53f5dabd10ef466e9395d860e6b9ed1c20d0f1488ea7287d6dd6907f22de0974/resolv.conf",
+    "HostnamePath": "/var/lib/docker/containers/53f5dabd10ef466e9395d860e6b9ed1c20d0f1488ea7287d6dd6907f22de0974/hostname",
+    "HostsPath": "/var/lib/docker/containers/53f5dabd10ef466e9395d860e6b9ed1c20d0f1488ea7287d6dd6907f22de0974/hosts",
+    "LogPath": "/var/lib/docker/containers/53f5dabd10ef466e9395d860e6b9ed1c20d0f1488ea7287d6dd6907f22de0974/53f5dabd10ef466e9395d860e6b9ed1c20d0f1488ea7287d6dd6907f22de0974-json.log",
+    "Name": "/some-name3",
+    "RestartCount": 0,
+    "Driver": "overlay2",
+    "Platform": "linux",
+    "MountLabel": "",
+    "ProcessLabel": "",
+    "AppArmorProfile": "docker-default",
+    "ExecIDs": null,
+    "HostConfig": {
+        "Binds": null,
+        "ContainerIDFile": "",
+        "LogConfig": {
+            "Type": "json-file",
+            "Config": {}
+        },
+        "NetworkMode": "default",
+        "PortBindings": {},
+        "RestartPolicy": {
+            "Name": "no",
+            "MaximumRetryCount": 0
+        },
+        "AutoRemove": false,
+        "VolumeDriver": "",
+        "VolumesFrom": null,
+        "CapAdd": null,
+        "CapDrop": null,
+        "Capabilities": null,
+        "Dns": [],
+        "DnsOptions": [],
+        "DnsSearch": [],
+        "ExtraHosts": null,
+        "GroupAdd": null,
+        "IpcMode": "private",
+        "Cgroup": "",
+        "Links": null,
+        "OomScoreAdj": 0,
+        "PidMode": "",
+        "Privileged": false,
+        "PublishAllPorts": false,
+        "ReadonlyRootfs": false,
+        "SecurityOpt": null,
+        "UTSMode": "",
+        "UsernsMode": "",
+        "ShmSize": 67108864,
+        "Runtime": "runc",
+        "ConsoleSize": [
+            0,
+            0
+        ],
+        "Isolation": "",
+        "CpuShares": 0,
+        "Memory": 0,
+        "NanoCpus": 0,
+        "CgroupParent": "",
+        "BlkioWeight": 0,
+        "BlkioWeightDevice": [],
+        "BlkioDeviceReadBps": null,
+        "BlkioDeviceWriteBps": null,
+        "BlkioDeviceReadIOps": null,
+        "BlkioDeviceWriteIOps": null,
+        "CpuPeriod": 0,
+        "CpuQuota": 0,
+        "CpuRealtimePeriod": 0,
+        "CpuRealtimeRuntime": 0,
+        "CpusetCpus": "",
+        "CpusetMems": "",
+        "Devices": [],
+        "DeviceCgroupRules": null,
+        "DeviceRequests": [
+            {
+                "Driver": "",
+                "Count": 0,
+                "DeviceIDs": [
+                    "0"
+                ],
+                "Capabilities": [
+                    [
+                        "gpu"
+                    ]
+                ],
+                "Options": {}
+            }
+        ],
+        "KernelMemory": 0,
+        "KernelMemoryTCP": 0,
+        "MemoryReservation": 0,
+        "MemorySwap": 0,
+        "MemorySwappiness": null,
+        "OomKillDisable": false,
+        "PidsLimit": null,
+        "Ulimits": null,
+        "CpuCount": 0,
+        "CpuPercent": 0,
+        "IOMaximumIOps": 0,
+        "IOMaximumBandwidth": 0,
+        "MaskedPaths": [
+            "/proc/asound",
+            "/proc/acpi",
+            "/proc/kcore",
+            "/proc/keys",
+            "/proc/latency_stats",
+            "/proc/timer_list",
+            "/proc/timer_stats",
+            "/proc/sched_debug",
+            "/proc/scsi",
+            "/sys/firmware"
+        ],
+        "ReadonlyPaths": [
+            "/proc/bus",
+            "/proc/fs",
+            "/proc/irq",
+            "/proc/sys",
+            "/proc/sysrq-trigger"
+        ]
+    },
+    "GraphDriver": {
+        "Data": {
+            "LowerDir": "/var/lib/docker/overlay2/7e8bfc045c25db9ab16e78ab92f583bf3942df713758b8f13e3b614e8c37f1e2-init/diff:/var/lib/docker/overlay2/d99e43813bc3e3aa7a68cf4d8e74f580679b0842434f800fa5198f432633dec7/diff:/var/lib/docker/overlay2/c807104f23969ff561f1c8e365c3cbe3ec22db883dc296f0342507bfc5bb5608/diff:/var/lib/docker/overlay2/855144b677656aeb6a27e590e9328a0a52f6fe9ee46b3b0de75b5a546509f768/diff:/var/lib/docker/overlay2/a7dd9135b9c17a99502d81f533fa7505e6cb5dde366ab5d3d9022dc91fda7c94/diff:/var/lib/docker/overlay2/ea35f751b88651e34ee00674b79d95e2640a10ea32dd37b517103f0637d09864/diff:/var/lib/docker/overlay2/e9cb283c0df581a5d76b271bd788b34544e030454f46c00de3a683f8afa8de81/diff:/var/lib/docker/overlay2/e0db9c9629d0513bac5225a6924b4e08870f76b2e284652697c82247156ff61a/diff:/var/lib/docker/overlay2/3ddc2fc23f0330642e7f39dde1b4268a5ea4a515c7d1f98dc54e1c7ad6bb0eb2/diff:/var/lib/docker/overlay2/09ab599dfa099b9b26077d8f155ab1f998d47d856e6f63afa326e49a086f3d51/diff:/var/lib/docker/overlay2/3687ad1bfc74e72e48437188756b435e885793d1dc917010529560907baba5a7/diff:/var/lib/docker/overlay2/c75c40ef127a2cb8b020f8aa10c1d8bc106f2b52cde06543668dafeff060d4eb/diff:/var/lib/docker/overlay2/83325e9835dde858bee540dcb4ddb62378d01af05f0553b1c93121d5b12c3c39/diff:/var/lib/docker/overlay2/963e14e2de757429b4e0d0c4ac6295d17b1bacb4fb268dd81a9aa0987367e1ac/diff:/var/lib/docker/overlay2/7fed30658fe9f6f83f00752a9388aa0154ce56fd81cf7d35a0b584b3dbb0bc48/diff:/var/lib/docker/overlay2/b2a073f2db6286a43649b9082851e082bad4e6a2686782904139c28434ad658c/diff",
+            "MergedDir": "/var/lib/docker/overlay2/7e8bfc045c25db9ab16e78ab92f583bf3942df713758b8f13e3b614e8c37f1e2/merged",
+            "UpperDir": "/var/lib/docker/overlay2/7e8bfc045c25db9ab16e78ab92f583bf3942df713758b8f13e3b614e8c37f1e2/diff",
+            "WorkDir": "/var/lib/docker/overlay2/7e8bfc045c25db9ab16e78ab92f583bf3942df713758b8f13e3b614e8c37f1e2/work"
+        },
+        "Name": "overlay2"
+    },
+    "Mounts": [],
+    "Config": {
+        "Hostname": "53f5dabd10ef",
+        "Domainname": "",
+        "User": "",
+        "AttachStdin": false,
+        "AttachStdout": true,
+        "AttachStderr": true,
+        "Tty": false,
+        "OpenStdin": false,
+        "StdinOnce": false,
+        "Env": [
+            "PATH=/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
+            "CUDA_VERSION=10.1.243",
+            "CUDA_PKG_VERSION=10-1=10.1.243-1",
+            "LD_LIBRARY_PATH=/usr/local/cuda/extras/CUPTI/lib64:/usr/local/cuda/lib64:/usr/local/nvidia/lib:/usr/local/nvidia/lib64",
+            "NVIDIA_VISIBLE_DEVICES=all",
+            "NVIDIA_DRIVER_CAPABILITIES=compute,utility",
+            "NVIDIA_REQUIRE_CUDA=cuda>=10.1 brand=tesla,driver>=396,driver<397 brand=tesla,driver>=410,driver<411 brand=tesla,driver>=418,driver<419",
+            "LANG=C.UTF-8"
+        ],
+        "Cmd": [
+            "/bin/bash"
+        ],
+        "Image": "tensorflow/tensorflow:2.3.2-gpu",
+        "Volumes": null,
+        "WorkingDir": "",
+        "Entrypoint": null,
+        "OnBuild": null,
+        "Labels": {
+            "maintainer": "NVIDIA CORPORATION <cudatools@nvidia.com>"
+        }
+    },
+    "NetworkSettings": {
+        "Bridge": "",
+        "SandboxID": "cc8ea7ce53d5a7823580ba4f7d6def663853ee841f6aecae942a5a455279c30c",
+        "HairpinMode": false,
+        "LinkLocalIPv6Address": "",
+        "LinkLocalIPv6PrefixLen": 0,
+        "Ports": {},
+        "SandboxKey": "/var/run/docker/netns/cc8ea7ce53d5",
+        "SecondaryIPAddresses": null,
+        "SecondaryIPv6Addresses": null,
+        "EndpointID": "",
+        "Gateway": "",
+        "GlobalIPv6Address": "",
+        "GlobalIPv6PrefixLen": 0,
+        "IPAddress": "",
+        "IPPrefixLen": 0,
+        "IPv6Gateway": "",
+        "MacAddress": "",
+        "Networks": {
+            "bridge": {
+                "IPAMConfig": null,
+                "Links": null,
+                "Aliases": null,
+                "NetworkID": "24895a7db1c415556df257767d1ca9284e49730ca11b72a550b945da2c11d9d7",
+                "EndpointID": "",
+                "Gateway": "",
+                "IPAddress": "",
+                "IPPrefixLen": 0,
+                "IPv6Gateway": "",
+                "GlobalIPv6Address": "",
+                "GlobalIPv6PrefixLen": 0,
+                "MacAddress": "",
+                "DriverOpts": null
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/tests/python_on_whales/components/jsons/containers/11.json b/tests/python_on_whales/components/jsons/containers/11.json
new file mode 100644
index 00000000..6734b1f7
--- /dev/null
+++ b/tests/python_on_whales/components/jsons/containers/11.json
@@ -0,0 +1,217 @@
+{
+    "Id": "d7332d8e5ab8e9125a3b390853f6c771bc03222db09f7f1193928b8bcbb2e968",
+    "Created": "2021-01-28T13:53:04.274115645Z",
+    "Path": "/bin/bash",
+    "Args": [],
+    "State": {
+        "Status": "exited",
+        "Running": false,
+        "Paused": false,
+        "Restarting": false,
+        "OOMKilled": false,
+        "Dead": false,
+        "Pid": 0,
+        "ExitCode": 0,
+        "Error": "",
+        "StartedAt": "2021-01-28T13:53:04.656446354Z",
+        "FinishedAt": "2021-01-28T13:53:04.677030085Z"
+    },
+    "Image": "sha256:d79ad2663f3912284ecc2e5348fd014087556c79555a0a9db8ea07ec7b259b09",
+    "ResolvConfPath": "/var/lib/docker/containers/d7332d8e5ab8e9125a3b390853f6c771bc03222db09f7f1193928b8bcbb2e968/resolv.conf",
+    "HostnamePath": "/var/lib/docker/containers/d7332d8e5ab8e9125a3b390853f6c771bc03222db09f7f1193928b8bcbb2e968/hostname",
+    "HostsPath": "/var/lib/docker/containers/d7332d8e5ab8e9125a3b390853f6c771bc03222db09f7f1193928b8bcbb2e968/hosts",
+    "LogPath": "/var/lib/docker/containers/d7332d8e5ab8e9125a3b390853f6c771bc03222db09f7f1193928b8bcbb2e968/d7332d8e5ab8e9125a3b390853f6c771bc03222db09f7f1193928b8bcbb2e968-json.log",
+    "Name": "/some-name4",
+    "RestartCount": 0,
+    "Driver": "overlay2",
+    "Platform": "linux",
+    "MountLabel": "",
+    "ProcessLabel": "",
+    "AppArmorProfile": "docker-default",
+    "ExecIDs": null,
+    "HostConfig": {
+        "Binds": null,
+        "ContainerIDFile": "",
+        "LogConfig": {
+            "Type": "json-file",
+            "Config": {}
+        },
+        "NetworkMode": "default",
+        "PortBindings": {},
+        "RestartPolicy": {
+            "Name": "no",
+            "MaximumRetryCount": 0
+        },
+        "AutoRemove": false,
+        "VolumeDriver": "",
+        "VolumesFrom": null,
+        "CapAdd": null,
+        "CapDrop": null,
+        "Capabilities": null,
+        "Dns": [],
+        "DnsOptions": [],
+        "DnsSearch": [],
+        "ExtraHosts": null,
+        "GroupAdd": null,
+        "IpcMode": "private",
+        "Cgroup": "",
+        "Links": null,
+        "OomScoreAdj": 0,
+        "PidMode": "",
+        "Privileged": false,
+        "PublishAllPorts": false,
+        "ReadonlyRootfs": false,
+        "SecurityOpt": null,
+        "UTSMode": "",
+        "UsernsMode": "",
+        "ShmSize": 67108864,
+        "Runtime": "runc",
+        "ConsoleSize": [
+            0,
+            0
+        ],
+        "Isolation": "",
+        "CpuShares": 0,
+        "Memory": 0,
+        "NanoCpus": 0,
+        "CgroupParent": "",
+        "BlkioWeight": 0,
+        "BlkioWeightDevice": [],
+        "BlkioDeviceReadBps": null,
+        "BlkioDeviceWriteBps": null,
+        "BlkioDeviceReadIOps": null,
+        "BlkioDeviceWriteIOps": null,
+        "CpuPeriod": 0,
+        "CpuQuota": 0,
+        "CpuRealtimePeriod": 0,
+        "CpuRealtimeRuntime": 0,
+        "CpusetCpus": "",
+        "CpusetMems": "",
+        "Devices": [],
+        "DeviceCgroupRules": null,
+        "DeviceRequests": [
+            {
+                "Driver": "",
+                "Count": 0,
+                "DeviceIDs": [
+                    "GPU-4a6ee635-4b42-8ffa-a3c3-959cd2899999"
+                ],
+                "Capabilities": [
+                    [
+                        "gpu"
+                    ]
+                ],
+                "Options": {}
+            }
+        ],
+        "KernelMemory": 0,
+        "KernelMemoryTCP": 0,
+        "MemoryReservation": 0,
+        "MemorySwap": 0,
+        "MemorySwappiness": null,
+        "OomKillDisable": false,
+        "PidsLimit": null,
+        "Ulimits": null,
+        "CpuCount": 0,
+        "CpuPercent": 0,
+        "IOMaximumIOps": 0,
+        "IOMaximumBandwidth": 0,
+        "MaskedPaths": [
+            "/proc/asound",
+            "/proc/acpi",
+            "/proc/kcore",
+            "/proc/keys",
+            "/proc/latency_stats",
+            "/proc/timer_list",
+            "/proc/timer_stats",
+            "/proc/sched_debug",
+            "/proc/scsi",
+            "/sys/firmware"
+        ],
+        "ReadonlyPaths": [
+            "/proc/bus",
+            "/proc/fs",
+            "/proc/irq",
+            "/proc/sys",
+            "/proc/sysrq-trigger"
+        ]
+    },
+    "GraphDriver": {
+        "Data": {
+            "LowerDir": "/var/lib/docker/overlay2/ee6184a8cb36bc3f60168a8b5e3fb77b6b766c70ee6ef3ac668c3af31d19ed29-init/diff:/var/lib/docker/overlay2/d99e43813bc3e3aa7a68cf4d8e74f580679b0842434f800fa5198f432633dec7/diff:/var/lib/docker/overlay2/c807104f23969ff561f1c8e365c3cbe3ec22db883dc296f0342507bfc5bb5608/diff:/var/lib/docker/overlay2/855144b677656aeb6a27e590e9328a0a52f6fe9ee46b3b0de75b5a546509f768/diff:/var/lib/docker/overlay2/a7dd9135b9c17a99502d81f533fa7505e6cb5dde366ab5d3d9022dc91fda7c94/diff:/var/lib/docker/overlay2/ea35f751b88651e34ee00674b79d95e2640a10ea32dd37b517103f0637d09864/diff:/var/lib/docker/overlay2/e9cb283c0df581a5d76b271bd788b34544e030454f46c00de3a683f8afa8de81/diff:/var/lib/docker/overlay2/e0db9c9629d0513bac5225a6924b4e08870f76b2e284652697c82247156ff61a/diff:/var/lib/docker/overlay2/3ddc2fc23f0330642e7f39dde1b4268a5ea4a515c7d1f98dc54e1c7ad6bb0eb2/diff:/var/lib/docker/overlay2/09ab599dfa099b9b26077d8f155ab1f998d47d856e6f63afa326e49a086f3d51/diff:/var/lib/docker/overlay2/3687ad1bfc74e72e48437188756b435e885793d1dc917010529560907baba5a7/diff:/var/lib/docker/overlay2/c75c40ef127a2cb8b020f8aa10c1d8bc106f2b52cde06543668dafeff060d4eb/diff:/var/lib/docker/overlay2/83325e9835dde858bee540dcb4ddb62378d01af05f0553b1c93121d5b12c3c39/diff:/var/lib/docker/overlay2/963e14e2de757429b4e0d0c4ac6295d17b1bacb4fb268dd81a9aa0987367e1ac/diff:/var/lib/docker/overlay2/7fed30658fe9f6f83f00752a9388aa0154ce56fd81cf7d35a0b584b3dbb0bc48/diff:/var/lib/docker/overlay2/b2a073f2db6286a43649b9082851e082bad4e6a2686782904139c28434ad658c/diff",
+            "MergedDir": "/var/lib/docker/overlay2/ee6184a8cb36bc3f60168a8b5e3fb77b6b766c70ee6ef3ac668c3af31d19ed29/merged",
+            "UpperDir": "/var/lib/docker/overlay2/ee6184a8cb36bc3f60168a8b5e3fb77b6b766c70ee6ef3ac668c3af31d19ed29/diff",
+            "WorkDir": "/var/lib/docker/overlay2/ee6184a8cb36bc3f60168a8b5e3fb77b6b766c70ee6ef3ac668c3af31d19ed29/work"
+        },
+        "Name": "overlay2"
+    },
+    "Mounts": [],
+    "Config": {
+        "Hostname": "d7332d8e5ab8",
+        "Domainname": "",
+        "User": "",
+        "AttachStdin": false,
+        "AttachStdout": true,
+        "AttachStderr": true,
+        "Tty": false,
+        "OpenStdin": false,
+        "StdinOnce": false,
+        "Env": [
+            "PATH=/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
+            "CUDA_VERSION=10.1.243",
+            "CUDA_PKG_VERSION=10-1=10.1.243-1",
+            "LD_LIBRARY_PATH=/usr/local/cuda/extras/CUPTI/lib64:/usr/local/cuda/lib64:/usr/local/nvidia/lib:/usr/local/nvidia/lib64",
+            "NVIDIA_VISIBLE_DEVICES=all",
+            "NVIDIA_DRIVER_CAPABILITIES=compute,utility",
+            "NVIDIA_REQUIRE_CUDA=cuda>=10.1 brand=tesla,driver>=396,driver<397 brand=tesla,driver>=410,driver<411 brand=tesla,driver>=418,driver<419",
+            "LANG=C.UTF-8"
+        ],
+        "Cmd": [
+            "/bin/bash"
+        ],
+        "Image": "tensorflow/tensorflow:2.3.2-gpu",
+        "Volumes": null,
+        "WorkingDir": "",
+        "Entrypoint": null,
+        "OnBuild": null,
+        "Labels": {
+            "maintainer": "NVIDIA CORPORATION <cudatools@nvidia.com>"
+        }
+    },
+    "NetworkSettings": {
+        "Bridge": "",
+        "SandboxID": "ea486d5dede2ef3421e1000c8b2763086c573b1c5666c6a36969bcaf82d7b28c",
+        "HairpinMode": false,
+        "LinkLocalIPv6Address": "",
+        "LinkLocalIPv6PrefixLen": 0,
+        "Ports": {},
+        "SandboxKey": "/var/run/docker/netns/ea486d5dede2",
+        "SecondaryIPAddresses": null,
+        "SecondaryIPv6Addresses": null,
+        "EndpointID": "",
+        "Gateway": "",
+        "GlobalIPv6Address": "",
+        "GlobalIPv6PrefixLen": 0,
+        "IPAddress": "",
+        "IPPrefixLen": 0,
+        "IPv6Gateway": "",
+        "MacAddress": "",
+        "Networks": {
+            "bridge": {
+                "IPAMConfig": null,
+                "Links": null,
+                "Aliases": null,
+                "NetworkID": "24895a7db1c415556df257767d1ca9284e49730ca11b72a550b945da2c11d9d7",
+                "EndpointID": "",
+                "Gateway": "",
+                "IPAddress": "",
+                "IPPrefixLen": 0,
+                "IPv6Gateway": "",
+                "GlobalIPv6Address": "",
+                "GlobalIPv6PrefixLen": 0,
+                "MacAddress": "",
+                "DriverOpts": null
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/tests/python_on_whales/components/jsons/containers/12.json b/tests/python_on_whales/components/jsons/containers/12.json
new file mode 100644
index 00000000..8b382b35
--- /dev/null
+++ b/tests/python_on_whales/components/jsons/containers/12.json
@@ -0,0 +1,217 @@
+{
+    "Id": "e2d4899f830f9f3f1ac0b6de559f9f0545b6d2b70b2641a2dba930e62ba0e7b4",
+    "Created": "2021-01-28T13:54:48.380036278Z",
+    "Path": "/bin/bash",
+    "Args": [],
+    "State": {
+        "Status": "exited",
+        "Running": false,
+        "Paused": false,
+        "Restarting": false,
+        "OOMKilled": false,
+        "Dead": false,
+        "Pid": 0,
+        "ExitCode": 0,
+        "Error": "",
+        "StartedAt": "2021-01-28T13:54:48.790808781Z",
+        "FinishedAt": "2021-01-28T13:54:48.824932982Z"
+    },
+    "Image": "sha256:d79ad2663f3912284ecc2e5348fd014087556c79555a0a9db8ea07ec7b259b09",
+    "ResolvConfPath": "/var/lib/docker/containers/e2d4899f830f9f3f1ac0b6de559f9f0545b6d2b70b2641a2dba930e62ba0e7b4/resolv.conf",
+    "HostnamePath": "/var/lib/docker/containers/e2d4899f830f9f3f1ac0b6de559f9f0545b6d2b70b2641a2dba930e62ba0e7b4/hostname",
+    "HostsPath": "/var/lib/docker/containers/e2d4899f830f9f3f1ac0b6de559f9f0545b6d2b70b2641a2dba930e62ba0e7b4/hosts",
+    "LogPath": "/var/lib/docker/containers/e2d4899f830f9f3f1ac0b6de559f9f0545b6d2b70b2641a2dba930e62ba0e7b4/e2d4899f830f9f3f1ac0b6de559f9f0545b6d2b70b2641a2dba930e62ba0e7b4-json.log",
+    "Name": "/some-name5",
+    "RestartCount": 0,
+    "Driver": "overlay2",
+    "Platform": "linux",
+    "MountLabel": "",
+    "ProcessLabel": "",
+    "AppArmorProfile": "docker-default",
+    "ExecIDs": null,
+    "HostConfig": {
+        "Binds": null,
+        "ContainerIDFile": "",
+        "LogConfig": {
+            "Type": "json-file",
+            "Config": {}
+        },
+        "NetworkMode": "default",
+        "PortBindings": {},
+        "RestartPolicy": {
+            "Name": "no",
+            "MaximumRetryCount": 0
+        },
+        "AutoRemove": false,
+        "VolumeDriver": "",
+        "VolumesFrom": null,
+        "CapAdd": null,
+        "CapDrop": null,
+        "Capabilities": null,
+        "Dns": [],
+        "DnsOptions": [],
+        "DnsSearch": [],
+        "ExtraHosts": null,
+        "GroupAdd": null,
+        "IpcMode": "private",
+        "Cgroup": "",
+        "Links": null,
+        "OomScoreAdj": 0,
+        "PidMode": "",
+        "Privileged": false,
+        "PublishAllPorts": false,
+        "ReadonlyRootfs": false,
+        "SecurityOpt": null,
+        "UTSMode": "",
+        "UsernsMode": "",
+        "ShmSize": 67108864,
+        "Runtime": "runc",
+        "ConsoleSize": [
+            0,
+            0
+        ],
+        "Isolation": "",
+        "CpuShares": 0,
+        "Memory": 0,
+        "NanoCpus": 0,
+        "CgroupParent": "",
+        "BlkioWeight": 0,
+        "BlkioWeightDevice": [],
+        "BlkioDeviceReadBps": null,
+        "BlkioDeviceWriteBps": null,
+        "BlkioDeviceReadIOps": null,
+        "BlkioDeviceWriteIOps": null,
+        "CpuPeriod": 0,
+        "CpuQuota": 0,
+        "CpuRealtimePeriod": 0,
+        "CpuRealtimeRuntime": 0,
+        "CpusetCpus": "",
+        "CpusetMems": "",
+        "Devices": [],
+        "DeviceCgroupRules": null,
+        "DeviceRequests": [
+            {
+                "Driver": "",
+                "Count": 0,
+                "DeviceIDs": [
+                    "none"
+                ],
+                "Capabilities": [
+                    [
+                        "gpu"
+                    ]
+                ],
+                "Options": {}
+            }
+        ],
+        "KernelMemory": 0,
+        "KernelMemoryTCP": 0,
+        "MemoryReservation": 0,
+        "MemorySwap": 0,
+        "MemorySwappiness": null,
+        "OomKillDisable": false,
+        "PidsLimit": null,
+        "Ulimits": null,
+        "CpuCount": 0,
+        "CpuPercent": 0,
+        "IOMaximumIOps": 0,
+        "IOMaximumBandwidth": 0,
+        "MaskedPaths": [
+            "/proc/asound",
+            "/proc/acpi",
+            "/proc/kcore",
+            "/proc/keys",
+            "/proc/latency_stats",
+            "/proc/timer_list",
+            "/proc/timer_stats",
+            "/proc/sched_debug",
+            "/proc/scsi",
+            "/sys/firmware"
+        ],
+        "ReadonlyPaths": [
+            "/proc/bus",
+            "/proc/fs",
+            "/proc/irq",
+            "/proc/sys",
+            "/proc/sysrq-trigger"
+        ]
+    },
+    "GraphDriver": {
+        "Data": {
+            "LowerDir": "/var/lib/docker/overlay2/ce31e3b4912895ba63ed922ab847dcd606a0cdcd11232d8288b5062f60e16818-init/diff:/var/lib/docker/overlay2/d99e43813bc3e3aa7a68cf4d8e74f580679b0842434f800fa5198f432633dec7/diff:/var/lib/docker/overlay2/c807104f23969ff561f1c8e365c3cbe3ec22db883dc296f0342507bfc5bb5608/diff:/var/lib/docker/overlay2/855144b677656aeb6a27e590e9328a0a52f6fe9ee46b3b0de75b5a546509f768/diff:/var/lib/docker/overlay2/a7dd9135b9c17a99502d81f533fa7505e6cb5dde366ab5d3d9022dc91fda7c94/diff:/var/lib/docker/overlay2/ea35f751b88651e34ee00674b79d95e2640a10ea32dd37b517103f0637d09864/diff:/var/lib/docker/overlay2/e9cb283c0df581a5d76b271bd788b34544e030454f46c00de3a683f8afa8de81/diff:/var/lib/docker/overlay2/e0db9c9629d0513bac5225a6924b4e08870f76b2e284652697c82247156ff61a/diff:/var/lib/docker/overlay2/3ddc2fc23f0330642e7f39dde1b4268a5ea4a515c7d1f98dc54e1c7ad6bb0eb2/diff:/var/lib/docker/overlay2/09ab599dfa099b9b26077d8f155ab1f998d47d856e6f63afa326e49a086f3d51/diff:/var/lib/docker/overlay2/3687ad1bfc74e72e48437188756b435e885793d1dc917010529560907baba5a7/diff:/var/lib/docker/overlay2/c75c40ef127a2cb8b020f8aa10c1d8bc106f2b52cde06543668dafeff060d4eb/diff:/var/lib/docker/overlay2/83325e9835dde858bee540dcb4ddb62378d01af05f0553b1c93121d5b12c3c39/diff:/var/lib/docker/overlay2/963e14e2de757429b4e0d0c4ac6295d17b1bacb4fb268dd81a9aa0987367e1ac/diff:/var/lib/docker/overlay2/7fed30658fe9f6f83f00752a9388aa0154ce56fd81cf7d35a0b584b3dbb0bc48/diff:/var/lib/docker/overlay2/b2a073f2db6286a43649b9082851e082bad4e6a2686782904139c28434ad658c/diff",
+            "MergedDir": "/var/lib/docker/overlay2/ce31e3b4912895ba63ed922ab847dcd606a0cdcd11232d8288b5062f60e16818/merged",
+            "UpperDir": "/var/lib/docker/overlay2/ce31e3b4912895ba63ed922ab847dcd606a0cdcd11232d8288b5062f60e16818/diff",
+            "WorkDir": "/var/lib/docker/overlay2/ce31e3b4912895ba63ed922ab847dcd606a0cdcd11232d8288b5062f60e16818/work"
+        },
+        "Name": "overlay2"
+    },
+    "Mounts": [],
+    "Config": {
+        "Hostname": "e2d4899f830f",
+        "Domainname": "",
+        "User": "",
+        "AttachStdin": false,
+        "AttachStdout": true,
+        "AttachStderr": true,
+        "Tty": false,
+        "OpenStdin": false,
+        "StdinOnce": false,
+        "Env": [
+            "PATH=/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
+            "CUDA_VERSION=10.1.243",
+            "CUDA_PKG_VERSION=10-1=10.1.243-1",
+            "LD_LIBRARY_PATH=/usr/local/cuda/extras/CUPTI/lib64:/usr/local/cuda/lib64:/usr/local/nvidia/lib:/usr/local/nvidia/lib64",
+            "NVIDIA_VISIBLE_DEVICES=all",
+            "NVIDIA_DRIVER_CAPABILITIES=compute,utility",
+            "NVIDIA_REQUIRE_CUDA=cuda>=10.1 brand=tesla,driver>=396,driver<397 brand=tesla,driver>=410,driver<411 brand=tesla,driver>=418,driver<419",
+            "LANG=C.UTF-8"
+        ],
+        "Cmd": [
+            "/bin/bash"
+        ],
+        "Image": "tensorflow/tensorflow:2.3.2-gpu",
+        "Volumes": null,
+        "WorkingDir": "",
+        "Entrypoint": null,
+        "OnBuild": null,
+        "Labels": {
+            "maintainer": "NVIDIA CORPORATION <cudatools@nvidia.com>"
+        }
+    },
+    "NetworkSettings": {
+        "Bridge": "",
+        "SandboxID": "236ffa1c594efa5a1882041a2ccd3cbe75ead5b1b05706311140f4f0379e6e0f",
+        "HairpinMode": false,
+        "LinkLocalIPv6Address": "",
+        "LinkLocalIPv6PrefixLen": 0,
+        "Ports": {},
+        "SandboxKey": "/var/run/docker/netns/236ffa1c594e",
+        "SecondaryIPAddresses": null,
+        "SecondaryIPv6Addresses": null,
+        "EndpointID": "",
+        "Gateway": "",
+        "GlobalIPv6Address": "",
+        "GlobalIPv6PrefixLen": 0,
+        "IPAddress": "",
+        "IPPrefixLen": 0,
+        "IPv6Gateway": "",
+        "MacAddress": "",
+        "Networks": {
+            "bridge": {
+                "IPAMConfig": null,
+                "Links": null,
+                "Aliases": null,
+                "NetworkID": "24895a7db1c415556df257767d1ca9284e49730ca11b72a550b945da2c11d9d7",
+                "EndpointID": "",
+                "Gateway": "",
+                "IPAddress": "",
+                "IPPrefixLen": 0,
+                "IPv6Gateway": "",
+                "GlobalIPv6Address": "",
+                "GlobalIPv6PrefixLen": 0,
+                "MacAddress": "",
+                "DriverOpts": null
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/tests/python_on_whales/components/jsons/containers/13.json b/tests/python_on_whales/components/jsons/containers/13.json
new file mode 100644
index 00000000..e94c4159
--- /dev/null
+++ b/tests/python_on_whales/components/jsons/containers/13.json
@@ -0,0 +1,215 @@
+{
+    "Id": "1111048862bebbb73562a6fb22aba140bf74374f7ee40adb161bf38c795b64de",
+    "Created": "2021-01-28T13:56:07.277380142Z",
+    "Path": "/bin/bash",
+    "Args": [],
+    "State": {
+        "Status": "created",
+        "Running": false,
+        "Paused": false,
+        "Restarting": false,
+        "OOMKilled": false,
+        "Dead": false,
+        "Pid": 0,
+        "ExitCode": 128,
+        "Error": "OCI runtime create failed: container_linux.go:349: starting container process caused \"process_linux.go:449: container init caused \\\"process_linux.go:432: running prestart hook 0 caused \\\\\\\"error running hook: exit status 1, stdout: , stderr: nvidia-container-cli: device error: 1: unknown device\\\\\\\\n\\\\\\\"\\\"\": unknown",
+        "StartedAt": "0001-01-01T00:00:00Z",
+        "FinishedAt": "0001-01-01T00:00:00Z"
+    },
+    "Image": "sha256:d79ad2663f3912284ecc2e5348fd014087556c79555a0a9db8ea07ec7b259b09",
+    "ResolvConfPath": "/var/lib/docker/containers/1111048862bebbb73562a6fb22aba140bf74374f7ee40adb161bf38c795b64de/resolv.conf",
+    "HostnamePath": "/var/lib/docker/containers/1111048862bebbb73562a6fb22aba140bf74374f7ee40adb161bf38c795b64de/hostname",
+    "HostsPath": "/var/lib/docker/containers/1111048862bebbb73562a6fb22aba140bf74374f7ee40adb161bf38c795b64de/hosts",
+    "LogPath": "/var/lib/docker/containers/1111048862bebbb73562a6fb22aba140bf74374f7ee40adb161bf38c795b64de/1111048862bebbb73562a6fb22aba140bf74374f7ee40adb161bf38c795b64de-json.log",
+    "Name": "/some-name6",
+    "RestartCount": 0,
+    "Driver": "overlay2",
+    "Platform": "linux",
+    "MountLabel": "",
+    "ProcessLabel": "",
+    "AppArmorProfile": "docker-default",
+    "ExecIDs": null,
+    "HostConfig": {
+        "Binds": null,
+        "ContainerIDFile": "",
+        "LogConfig": {
+            "Type": "json-file",
+            "Config": {}
+        },
+        "NetworkMode": "default",
+        "PortBindings": {},
+        "RestartPolicy": {
+            "Name": "no",
+            "MaximumRetryCount": 0
+        },
+        "AutoRemove": false,
+        "VolumeDriver": "",
+        "VolumesFrom": null,
+        "CapAdd": null,
+        "CapDrop": null,
+        "Capabilities": null,
+        "Dns": [],
+        "DnsOptions": [],
+        "DnsSearch": [],
+        "ExtraHosts": null,
+        "GroupAdd": null,
+        "IpcMode": "private",
+        "Cgroup": "",
+        "Links": null,
+        "OomScoreAdj": 0,
+        "PidMode": "",
+        "Privileged": false,
+        "PublishAllPorts": false,
+        "ReadonlyRootfs": false,
+        "SecurityOpt": null,
+        "UTSMode": "",
+        "UsernsMode": "",
+        "ShmSize": 67108864,
+        "Runtime": "runc",
+        "ConsoleSize": [
+            0,
+            0
+        ],
+        "Isolation": "",
+        "CpuShares": 0,
+        "Memory": 0,
+        "NanoCpus": 0,
+        "CgroupParent": "",
+        "BlkioWeight": 0,
+        "BlkioWeightDevice": [],
+        "BlkioDeviceReadBps": null,
+        "BlkioDeviceWriteBps": null,
+        "BlkioDeviceReadIOps": null,
+        "BlkioDeviceWriteIOps": null,
+        "CpuPeriod": 0,
+        "CpuQuota": 0,
+        "CpuRealtimePeriod": 0,
+        "CpuRealtimeRuntime": 0,
+        "CpusetCpus": "",
+        "CpusetMems": "",
+        "Devices": [],
+        "DeviceCgroupRules": null,
+        "DeviceRequests": [
+            {
+                "Driver": "",
+                "Count": 2,
+                "DeviceIDs": null,
+                "Capabilities": [
+                    [
+                        "gpu"
+                    ]
+                ],
+                "Options": {}
+            }
+        ],
+        "KernelMemory": 0,
+        "KernelMemoryTCP": 0,
+        "MemoryReservation": 0,
+        "MemorySwap": 0,
+        "MemorySwappiness": null,
+        "OomKillDisable": false,
+        "PidsLimit": null,
+        "Ulimits": null,
+        "CpuCount": 0,
+        "CpuPercent": 0,
+        "IOMaximumIOps": 0,
+        "IOMaximumBandwidth": 0,
+        "MaskedPaths": [
+            "/proc/asound",
+            "/proc/acpi",
+            "/proc/kcore",
+            "/proc/keys",
+            "/proc/latency_stats",
+            "/proc/timer_list",
+            "/proc/timer_stats",
+            "/proc/sched_debug",
+            "/proc/scsi",
+            "/sys/firmware"
+        ],
+        "ReadonlyPaths": [
+            "/proc/bus",
+            "/proc/fs",
+            "/proc/irq",
+            "/proc/sys",
+            "/proc/sysrq-trigger"
+        ]
+    },
+    "GraphDriver": {
+        "Data": {
+            "LowerDir": "/var/lib/docker/overlay2/17911eb185a5ca3dcc48d69dd4cec222bd43a2df82eae9ea6ea258855993361f-init/diff:/var/lib/docker/overlay2/d99e43813bc3e3aa7a68cf4d8e74f580679b0842434f800fa5198f432633dec7/diff:/var/lib/docker/overlay2/c807104f23969ff561f1c8e365c3cbe3ec22db883dc296f0342507bfc5bb5608/diff:/var/lib/docker/overlay2/855144b677656aeb6a27e590e9328a0a52f6fe9ee46b3b0de75b5a546509f768/diff:/var/lib/docker/overlay2/a7dd9135b9c17a99502d81f533fa7505e6cb5dde366ab5d3d9022dc91fda7c94/diff:/var/lib/docker/overlay2/ea35f751b88651e34ee00674b79d95e2640a10ea32dd37b517103f0637d09864/diff:/var/lib/docker/overlay2/e9cb283c0df581a5d76b271bd788b34544e030454f46c00de3a683f8afa8de81/diff:/var/lib/docker/overlay2/e0db9c9629d0513bac5225a6924b4e08870f76b2e284652697c82247156ff61a/diff:/var/lib/docker/overlay2/3ddc2fc23f0330642e7f39dde1b4268a5ea4a515c7d1f98dc54e1c7ad6bb0eb2/diff:/var/lib/docker/overlay2/09ab599dfa099b9b26077d8f155ab1f998d47d856e6f63afa326e49a086f3d51/diff:/var/lib/docker/overlay2/3687ad1bfc74e72e48437188756b435e885793d1dc917010529560907baba5a7/diff:/var/lib/docker/overlay2/c75c40ef127a2cb8b020f8aa10c1d8bc106f2b52cde06543668dafeff060d4eb/diff:/var/lib/docker/overlay2/83325e9835dde858bee540dcb4ddb62378d01af05f0553b1c93121d5b12c3c39/diff:/var/lib/docker/overlay2/963e14e2de757429b4e0d0c4ac6295d17b1bacb4fb268dd81a9aa0987367e1ac/diff:/var/lib/docker/overlay2/7fed30658fe9f6f83f00752a9388aa0154ce56fd81cf7d35a0b584b3dbb0bc48/diff:/var/lib/docker/overlay2/b2a073f2db6286a43649b9082851e082bad4e6a2686782904139c28434ad658c/diff",
+            "MergedDir": "/var/lib/docker/overlay2/17911eb185a5ca3dcc48d69dd4cec222bd43a2df82eae9ea6ea258855993361f/merged",
+            "UpperDir": "/var/lib/docker/overlay2/17911eb185a5ca3dcc48d69dd4cec222bd43a2df82eae9ea6ea258855993361f/diff",
+            "WorkDir": "/var/lib/docker/overlay2/17911eb185a5ca3dcc48d69dd4cec222bd43a2df82eae9ea6ea258855993361f/work"
+        },
+        "Name": "overlay2"
+    },
+    "Mounts": [],
+    "Config": {
+        "Hostname": "1111048862be",
+        "Domainname": "",
+        "User": "",
+        "AttachStdin": false,
+        "AttachStdout": true,
+        "AttachStderr": true,
+        "Tty": false,
+        "OpenStdin": false,
+        "StdinOnce": false,
+        "Env": [
+            "PATH=/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
+            "CUDA_VERSION=10.1.243",
+            "CUDA_PKG_VERSION=10-1=10.1.243-1",
+            "LD_LIBRARY_PATH=/usr/local/cuda/extras/CUPTI/lib64:/usr/local/cuda/lib64:/usr/local/nvidia/lib:/usr/local/nvidia/lib64",
+            "NVIDIA_VISIBLE_DEVICES=all",
+            "NVIDIA_DRIVER_CAPABILITIES=compute,utility",
+            "NVIDIA_REQUIRE_CUDA=cuda>=10.1 brand=tesla,driver>=396,driver<397 brand=tesla,driver>=410,driver<411 brand=tesla,driver>=418,driver<419",
+            "LANG=C.UTF-8"
+        ],
+        "Cmd": [
+            "/bin/bash"
+        ],
+        "Image": "tensorflow/tensorflow:2.3.2-gpu",
+        "Volumes": null,
+        "WorkingDir": "",
+        "Entrypoint": null,
+        "OnBuild": null,
+        "Labels": {
+            "maintainer": "NVIDIA CORPORATION <cudatools@nvidia.com>"
+        }
+    },
+    "NetworkSettings": {
+        "Bridge": "",
+        "SandboxID": "ea436d01ae272ad82d41c9029b4a34c8e52ce2a373f27aa9da31f8e0423e3084",
+        "HairpinMode": false,
+        "LinkLocalIPv6Address": "",
+        "LinkLocalIPv6PrefixLen": 0,
+        "Ports": {},
+        "SandboxKey": "/var/run/docker/netns/ea436d01ae27",
+        "SecondaryIPAddresses": null,
+        "SecondaryIPv6Addresses": null,
+        "EndpointID": "",
+        "Gateway": "",
+        "GlobalIPv6Address": "",
+        "GlobalIPv6PrefixLen": 0,
+        "IPAddress": "",
+        "IPPrefixLen": 0,
+        "IPv6Gateway": "",
+        "MacAddress": "",
+        "Networks": {
+            "bridge": {
+                "IPAMConfig": null,
+                "Links": null,
+                "Aliases": null,
+                "NetworkID": "24895a7db1c415556df257767d1ca9284e49730ca11b72a550b945da2c11d9d7",
+                "EndpointID": "",
+                "Gateway": "",
+                "IPAddress": "",
+                "IPPrefixLen": 0,
+                "IPv6Gateway": "",
+                "GlobalIPv6Address": "",
+                "GlobalIPv6PrefixLen": 0,
+                "MacAddress": "",
+                "DriverOpts": null
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/tests/python_on_whales/components/jsons/containers/14.json b/tests/python_on_whales/components/jsons/containers/14.json
new file mode 100644
index 00000000..ca88062e
--- /dev/null
+++ b/tests/python_on_whales/components/jsons/containers/14.json
@@ -0,0 +1,215 @@
+{
+    "Id": "c549fd0805f9a7b89ce74cad78a423329b83943de6c445531b7e4ba25b1e4d8b",
+    "Created": "2021-01-28T13:56:27.543369085Z",
+    "Path": "/bin/bash",
+    "Args": [],
+    "State": {
+        "Status": "exited",
+        "Running": false,
+        "Paused": false,
+        "Restarting": false,
+        "OOMKilled": false,
+        "Dead": false,
+        "Pid": 0,
+        "ExitCode": 0,
+        "Error": "",
+        "StartedAt": "2021-01-28T13:56:27.912092862Z",
+        "FinishedAt": "2021-01-28T13:56:27.933907347Z"
+    },
+    "Image": "sha256:d79ad2663f3912284ecc2e5348fd014087556c79555a0a9db8ea07ec7b259b09",
+    "ResolvConfPath": "/var/lib/docker/containers/c549fd0805f9a7b89ce74cad78a423329b83943de6c445531b7e4ba25b1e4d8b/resolv.conf",
+    "HostnamePath": "/var/lib/docker/containers/c549fd0805f9a7b89ce74cad78a423329b83943de6c445531b7e4ba25b1e4d8b/hostname",
+    "HostsPath": "/var/lib/docker/containers/c549fd0805f9a7b89ce74cad78a423329b83943de6c445531b7e4ba25b1e4d8b/hosts",
+    "LogPath": "/var/lib/docker/containers/c549fd0805f9a7b89ce74cad78a423329b83943de6c445531b7e4ba25b1e4d8b/c549fd0805f9a7b89ce74cad78a423329b83943de6c445531b7e4ba25b1e4d8b-json.log",
+    "Name": "/some-name7",
+    "RestartCount": 0,
+    "Driver": "overlay2",
+    "Platform": "linux",
+    "MountLabel": "",
+    "ProcessLabel": "",
+    "AppArmorProfile": "docker-default",
+    "ExecIDs": null,
+    "HostConfig": {
+        "Binds": null,
+        "ContainerIDFile": "",
+        "LogConfig": {
+            "Type": "json-file",
+            "Config": {}
+        },
+        "NetworkMode": "default",
+        "PortBindings": {},
+        "RestartPolicy": {
+            "Name": "no",
+            "MaximumRetryCount": 0
+        },
+        "AutoRemove": false,
+        "VolumeDriver": "",
+        "VolumesFrom": null,
+        "CapAdd": null,
+        "CapDrop": null,
+        "Capabilities": null,
+        "Dns": [],
+        "DnsOptions": [],
+        "DnsSearch": [],
+        "ExtraHosts": null,
+        "GroupAdd": null,
+        "IpcMode": "private",
+        "Cgroup": "",
+        "Links": null,
+        "OomScoreAdj": 0,
+        "PidMode": "",
+        "Privileged": false,
+        "PublishAllPorts": false,
+        "ReadonlyRootfs": false,
+        "SecurityOpt": null,
+        "UTSMode": "",
+        "UsernsMode": "",
+        "ShmSize": 67108864,
+        "Runtime": "runc",
+        "ConsoleSize": [
+            0,
+            0
+        ],
+        "Isolation": "",
+        "CpuShares": 0,
+        "Memory": 0,
+        "NanoCpus": 0,
+        "CgroupParent": "",
+        "BlkioWeight": 0,
+        "BlkioWeightDevice": [],
+        "BlkioDeviceReadBps": null,
+        "BlkioDeviceWriteBps": null,
+        "BlkioDeviceReadIOps": null,
+        "BlkioDeviceWriteIOps": null,
+        "CpuPeriod": 0,
+        "CpuQuota": 0,
+        "CpuRealtimePeriod": 0,
+        "CpuRealtimeRuntime": 0,
+        "CpusetCpus": "",
+        "CpusetMems": "",
+        "Devices": [],
+        "DeviceCgroupRules": null,
+        "DeviceRequests": [
+            {
+                "Driver": "",
+                "Count": 1,
+                "DeviceIDs": null,
+                "Capabilities": [
+                    [
+                        "gpu"
+                    ]
+                ],
+                "Options": {}
+            }
+        ],
+        "KernelMemory": 0,
+        "KernelMemoryTCP": 0,
+        "MemoryReservation": 0,
+        "MemorySwap": 0,
+        "MemorySwappiness": null,
+        "OomKillDisable": false,
+        "PidsLimit": null,
+        "Ulimits": null,
+        "CpuCount": 0,
+        "CpuPercent": 0,
+        "IOMaximumIOps": 0,
+        "IOMaximumBandwidth": 0,
+        "MaskedPaths": [
+            "/proc/asound",
+            "/proc/acpi",
+            "/proc/kcore",
+            "/proc/keys",
+            "/proc/latency_stats",
+            "/proc/timer_list",
+            "/proc/timer_stats",
+            "/proc/sched_debug",
+            "/proc/scsi",
+            "/sys/firmware"
+        ],
+        "ReadonlyPaths": [
+            "/proc/bus",
+            "/proc/fs",
+            "/proc/irq",
+            "/proc/sys",
+            "/proc/sysrq-trigger"
+        ]
+    },
+    "GraphDriver": {
+        "Data": {
+            "LowerDir": "/var/lib/docker/overlay2/940cd0201b25b80be18d7138bdffc033d519ec29a9cace4f9a44d272f82a8a3b-init/diff:/var/lib/docker/overlay2/d99e43813bc3e3aa7a68cf4d8e74f580679b0842434f800fa5198f432633dec7/diff:/var/lib/docker/overlay2/c807104f23969ff561f1c8e365c3cbe3ec22db883dc296f0342507bfc5bb5608/diff:/var/lib/docker/overlay2/855144b677656aeb6a27e590e9328a0a52f6fe9ee46b3b0de75b5a546509f768/diff:/var/lib/docker/overlay2/a7dd9135b9c17a99502d81f533fa7505e6cb5dde366ab5d3d9022dc91fda7c94/diff:/var/lib/docker/overlay2/ea35f751b88651e34ee00674b79d95e2640a10ea32dd37b517103f0637d09864/diff:/var/lib/docker/overlay2/e9cb283c0df581a5d76b271bd788b34544e030454f46c00de3a683f8afa8de81/diff:/var/lib/docker/overlay2/e0db9c9629d0513bac5225a6924b4e08870f76b2e284652697c82247156ff61a/diff:/var/lib/docker/overlay2/3ddc2fc23f0330642e7f39dde1b4268a5ea4a515c7d1f98dc54e1c7ad6bb0eb2/diff:/var/lib/docker/overlay2/09ab599dfa099b9b26077d8f155ab1f998d47d856e6f63afa326e49a086f3d51/diff:/var/lib/docker/overlay2/3687ad1bfc74e72e48437188756b435e885793d1dc917010529560907baba5a7/diff:/var/lib/docker/overlay2/c75c40ef127a2cb8b020f8aa10c1d8bc106f2b52cde06543668dafeff060d4eb/diff:/var/lib/docker/overlay2/83325e9835dde858bee540dcb4ddb62378d01af05f0553b1c93121d5b12c3c39/diff:/var/lib/docker/overlay2/963e14e2de757429b4e0d0c4ac6295d17b1bacb4fb268dd81a9aa0987367e1ac/diff:/var/lib/docker/overlay2/7fed30658fe9f6f83f00752a9388aa0154ce56fd81cf7d35a0b584b3dbb0bc48/diff:/var/lib/docker/overlay2/b2a073f2db6286a43649b9082851e082bad4e6a2686782904139c28434ad658c/diff",
+            "MergedDir": "/var/lib/docker/overlay2/940cd0201b25b80be18d7138bdffc033d519ec29a9cace4f9a44d272f82a8a3b/merged",
+            "UpperDir": "/var/lib/docker/overlay2/940cd0201b25b80be18d7138bdffc033d519ec29a9cace4f9a44d272f82a8a3b/diff",
+            "WorkDir": "/var/lib/docker/overlay2/940cd0201b25b80be18d7138bdffc033d519ec29a9cace4f9a44d272f82a8a3b/work"
+        },
+        "Name": "overlay2"
+    },
+    "Mounts": [],
+    "Config": {
+        "Hostname": "c549fd0805f9",
+        "Domainname": "",
+        "User": "",
+        "AttachStdin": false,
+        "AttachStdout": true,
+        "AttachStderr": true,
+        "Tty": false,
+        "OpenStdin": false,
+        "StdinOnce": false,
+        "Env": [
+            "PATH=/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
+            "CUDA_VERSION=10.1.243",
+            "CUDA_PKG_VERSION=10-1=10.1.243-1",
+            "LD_LIBRARY_PATH=/usr/local/cuda/extras/CUPTI/lib64:/usr/local/cuda/lib64:/usr/local/nvidia/lib:/usr/local/nvidia/lib64",
+            "NVIDIA_VISIBLE_DEVICES=all",
+            "NVIDIA_DRIVER_CAPABILITIES=compute,utility",
+            "NVIDIA_REQUIRE_CUDA=cuda>=10.1 brand=tesla,driver>=396,driver<397 brand=tesla,driver>=410,driver<411 brand=tesla,driver>=418,driver<419",
+            "LANG=C.UTF-8"
+        ],
+        "Cmd": [
+            "/bin/bash"
+        ],
+        "Image": "tensorflow/tensorflow:2.3.2-gpu",
+        "Volumes": null,
+        "WorkingDir": "",
+        "Entrypoint": null,
+        "OnBuild": null,
+        "Labels": {
+            "maintainer": "NVIDIA CORPORATION <cudatools@nvidia.com>"
+        }
+    },
+    "NetworkSettings": {
+        "Bridge": "",
+        "SandboxID": "620dd5321691bb07815b0b843f6a2ba3a258c2f10cdc12558d94bdb4ae2f6e28",
+        "HairpinMode": false,
+        "LinkLocalIPv6Address": "",
+        "LinkLocalIPv6PrefixLen": 0,
+        "Ports": {},
+        "SandboxKey": "/var/run/docker/netns/620dd5321691",
+        "SecondaryIPAddresses": null,
+        "SecondaryIPv6Addresses": null,
+        "EndpointID": "",
+        "Gateway": "",
+        "GlobalIPv6Address": "",
+        "GlobalIPv6PrefixLen": 0,
+        "IPAddress": "",
+        "IPPrefixLen": 0,
+        "IPv6Gateway": "",
+        "MacAddress": "",
+        "Networks": {
+            "bridge": {
+                "IPAMConfig": null,
+                "Links": null,
+                "Aliases": null,
+                "NetworkID": "24895a7db1c415556df257767d1ca9284e49730ca11b72a550b945da2c11d9d7",
+                "EndpointID": "",
+                "Gateway": "",
+                "IPAddress": "",
+                "IPPrefixLen": 0,
+                "IPv6Gateway": "",
+                "GlobalIPv6Address": "",
+                "GlobalIPv6PrefixLen": 0,
+                "MacAddress": "",
+                "DriverOpts": null
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/tests/python_on_whales/components/jsons/containers/15.json b/tests/python_on_whales/components/jsons/containers/15.json
new file mode 100644
index 00000000..a969d2bc
--- /dev/null
+++ b/tests/python_on_whales/components/jsons/containers/15.json
@@ -0,0 +1,215 @@
+{
+    "Id": "62428637e592e3766f3dcc6d9272f96145f0007833f5ebf6d51b954a9af49174",
+    "Created": "2021-01-28T14:08:12.703751813Z",
+    "Path": "/bin/bash",
+    "Args": [],
+    "State": {
+        "Status": "exited",
+        "Running": false,
+        "Paused": false,
+        "Restarting": false,
+        "OOMKilled": false,
+        "Dead": false,
+        "Pid": 0,
+        "ExitCode": 0,
+        "Error": "",
+        "StartedAt": "2021-01-28T14:08:13.09538573Z",
+        "FinishedAt": "2021-01-28T14:08:13.112992479Z"
+    },
+    "Image": "sha256:d79ad2663f3912284ecc2e5348fd014087556c79555a0a9db8ea07ec7b259b09",
+    "ResolvConfPath": "/var/lib/docker/containers/62428637e592e3766f3dcc6d9272f96145f0007833f5ebf6d51b954a9af49174/resolv.conf",
+    "HostnamePath": "/var/lib/docker/containers/62428637e592e3766f3dcc6d9272f96145f0007833f5ebf6d51b954a9af49174/hostname",
+    "HostsPath": "/var/lib/docker/containers/62428637e592e3766f3dcc6d9272f96145f0007833f5ebf6d51b954a9af49174/hosts",
+    "LogPath": "/var/lib/docker/containers/62428637e592e3766f3dcc6d9272f96145f0007833f5ebf6d51b954a9af49174/62428637e592e3766f3dcc6d9272f96145f0007833f5ebf6d51b954a9af49174-json.log",
+    "Name": "/some-name8",
+    "RestartCount": 0,
+    "Driver": "overlay2",
+    "Platform": "linux",
+    "MountLabel": "",
+    "ProcessLabel": "",
+    "AppArmorProfile": "docker-default",
+    "ExecIDs": null,
+    "HostConfig": {
+        "Binds": null,
+        "ContainerIDFile": "",
+        "LogConfig": {
+            "Type": "json-file",
+            "Config": {}
+        },
+        "NetworkMode": "default",
+        "PortBindings": {},
+        "RestartPolicy": {
+            "Name": "no",
+            "MaximumRetryCount": 0
+        },
+        "AutoRemove": false,
+        "VolumeDriver": "",
+        "VolumesFrom": null,
+        "CapAdd": null,
+        "CapDrop": null,
+        "Capabilities": null,
+        "Dns": [],
+        "DnsOptions": [],
+        "DnsSearch": [],
+        "ExtraHosts": null,
+        "GroupAdd": null,
+        "IpcMode": "private",
+        "Cgroup": "",
+        "Links": null,
+        "OomScoreAdj": 0,
+        "PidMode": "",
+        "Privileged": false,
+        "PublishAllPorts": false,
+        "ReadonlyRootfs": false,
+        "SecurityOpt": null,
+        "UTSMode": "",
+        "UsernsMode": "",
+        "ShmSize": 67108864,
+        "Runtime": "runc",
+        "ConsoleSize": [
+            0,
+            0
+        ],
+        "Isolation": "",
+        "CpuShares": 0,
+        "Memory": 0,
+        "NanoCpus": 0,
+        "CgroupParent": "",
+        "BlkioWeight": 0,
+        "BlkioWeightDevice": [],
+        "BlkioDeviceReadBps": null,
+        "BlkioDeviceWriteBps": null,
+        "BlkioDeviceReadIOps": null,
+        "BlkioDeviceWriteIOps": null,
+        "CpuPeriod": 0,
+        "CpuQuota": 0,
+        "CpuRealtimePeriod": 0,
+        "CpuRealtimeRuntime": 0,
+        "CpusetCpus": "",
+        "CpusetMems": "",
+        "Devices": [],
+        "DeviceCgroupRules": null,
+        "DeviceRequests": [
+            {
+                "Driver": "",
+                "Count": -1,
+                "DeviceIDs": null,
+                "Capabilities": [
+                    [
+                        "gpu"
+                    ]
+                ],
+                "Options": {}
+            }
+        ],
+        "KernelMemory": 0,
+        "KernelMemoryTCP": 0,
+        "MemoryReservation": 0,
+        "MemorySwap": 0,
+        "MemorySwappiness": null,
+        "OomKillDisable": false,
+        "PidsLimit": null,
+        "Ulimits": null,
+        "CpuCount": 0,
+        "CpuPercent": 0,
+        "IOMaximumIOps": 0,
+        "IOMaximumBandwidth": 0,
+        "MaskedPaths": [
+            "/proc/asound",
+            "/proc/acpi",
+            "/proc/kcore",
+            "/proc/keys",
+            "/proc/latency_stats",
+            "/proc/timer_list",
+            "/proc/timer_stats",
+            "/proc/sched_debug",
+            "/proc/scsi",
+            "/sys/firmware"
+        ],
+        "ReadonlyPaths": [
+            "/proc/bus",
+            "/proc/fs",
+            "/proc/irq",
+            "/proc/sys",
+            "/proc/sysrq-trigger"
+        ]
+    },
+    "GraphDriver": {
+        "Data": {
+            "LowerDir": "/var/lib/docker/overlay2/a74c541c4b73277d7eb401ce6771fec18805a87cfc24748cc97d03762ec757a2-init/diff:/var/lib/docker/overlay2/d99e43813bc3e3aa7a68cf4d8e74f580679b0842434f800fa5198f432633dec7/diff:/var/lib/docker/overlay2/c807104f23969ff561f1c8e365c3cbe3ec22db883dc296f0342507bfc5bb5608/diff:/var/lib/docker/overlay2/855144b677656aeb6a27e590e9328a0a52f6fe9ee46b3b0de75b5a546509f768/diff:/var/lib/docker/overlay2/a7dd9135b9c17a99502d81f533fa7505e6cb5dde366ab5d3d9022dc91fda7c94/diff:/var/lib/docker/overlay2/ea35f751b88651e34ee00674b79d95e2640a10ea32dd37b517103f0637d09864/diff:/var/lib/docker/overlay2/e9cb283c0df581a5d76b271bd788b34544e030454f46c00de3a683f8afa8de81/diff:/var/lib/docker/overlay2/e0db9c9629d0513bac5225a6924b4e08870f76b2e284652697c82247156ff61a/diff:/var/lib/docker/overlay2/3ddc2fc23f0330642e7f39dde1b4268a5ea4a515c7d1f98dc54e1c7ad6bb0eb2/diff:/var/lib/docker/overlay2/09ab599dfa099b9b26077d8f155ab1f998d47d856e6f63afa326e49a086f3d51/diff:/var/lib/docker/overlay2/3687ad1bfc74e72e48437188756b435e885793d1dc917010529560907baba5a7/diff:/var/lib/docker/overlay2/c75c40ef127a2cb8b020f8aa10c1d8bc106f2b52cde06543668dafeff060d4eb/diff:/var/lib/docker/overlay2/83325e9835dde858bee540dcb4ddb62378d01af05f0553b1c93121d5b12c3c39/diff:/var/lib/docker/overlay2/963e14e2de757429b4e0d0c4ac6295d17b1bacb4fb268dd81a9aa0987367e1ac/diff:/var/lib/docker/overlay2/7fed30658fe9f6f83f00752a9388aa0154ce56fd81cf7d35a0b584b3dbb0bc48/diff:/var/lib/docker/overlay2/b2a073f2db6286a43649b9082851e082bad4e6a2686782904139c28434ad658c/diff",
+            "MergedDir": "/var/lib/docker/overlay2/a74c541c4b73277d7eb401ce6771fec18805a87cfc24748cc97d03762ec757a2/merged",
+            "UpperDir": "/var/lib/docker/overlay2/a74c541c4b73277d7eb401ce6771fec18805a87cfc24748cc97d03762ec757a2/diff",
+            "WorkDir": "/var/lib/docker/overlay2/a74c541c4b73277d7eb401ce6771fec18805a87cfc24748cc97d03762ec757a2/work"
+        },
+        "Name": "overlay2"
+    },
+    "Mounts": [],
+    "Config": {
+        "Hostname": "62428637e592",
+        "Domainname": "",
+        "User": "",
+        "AttachStdin": false,
+        "AttachStdout": false,
+        "AttachStderr": false,
+        "Tty": false,
+        "OpenStdin": false,
+        "StdinOnce": false,
+        "Env": [
+            "PATH=/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
+            "CUDA_VERSION=10.1.243",
+            "CUDA_PKG_VERSION=10-1=10.1.243-1",
+            "LD_LIBRARY_PATH=/usr/local/cuda/extras/CUPTI/lib64:/usr/local/cuda/lib64:/usr/local/nvidia/lib:/usr/local/nvidia/lib64",
+            "NVIDIA_VISIBLE_DEVICES=all",
+            "NVIDIA_DRIVER_CAPABILITIES=compute,utility",
+            "NVIDIA_REQUIRE_CUDA=cuda>=10.1 brand=tesla,driver>=396,driver<397 brand=tesla,driver>=410,driver<411 brand=tesla,driver>=418,driver<419",
+            "LANG=C.UTF-8"
+        ],
+        "Cmd": [
+            "/bin/bash"
+        ],
+        "Image": "tensorflow/tensorflow:2.3.2-gpu",
+        "Volumes": null,
+        "WorkingDir": "",
+        "Entrypoint": null,
+        "OnBuild": null,
+        "Labels": {
+            "maintainer": "NVIDIA CORPORATION <cudatools@nvidia.com>"
+        }
+    },
+    "NetworkSettings": {
+        "Bridge": "",
+        "SandboxID": "d2f68dfebdc637b5b09aeb41134f5dd84c62ce1e17d81756e23b54b937c97af5",
+        "HairpinMode": false,
+        "LinkLocalIPv6Address": "",
+        "LinkLocalIPv6PrefixLen": 0,
+        "Ports": {},
+        "SandboxKey": "/var/run/docker/netns/d2f68dfebdc6",
+        "SecondaryIPAddresses": null,
+        "SecondaryIPv6Addresses": null,
+        "EndpointID": "",
+        "Gateway": "",
+        "GlobalIPv6Address": "",
+        "GlobalIPv6PrefixLen": 0,
+        "IPAddress": "",
+        "IPPrefixLen": 0,
+        "IPv6Gateway": "",
+        "MacAddress": "",
+        "Networks": {
+            "bridge": {
+                "IPAMConfig": null,
+                "Links": null,
+                "Aliases": null,
+                "NetworkID": "24895a7db1c415556df257767d1ca9284e49730ca11b72a550b945da2c11d9d7",
+                "EndpointID": "",
+                "Gateway": "",
+                "IPAddress": "",
+                "IPPrefixLen": 0,
+                "IPv6Gateway": "",
+                "GlobalIPv6Address": "",
+                "GlobalIPv6PrefixLen": 0,
+                "MacAddress": "",
+                "DriverOpts": null
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/tests/python_on_whales/components/jsons/containers/8.json b/tests/python_on_whales/components/jsons/containers/8.json
new file mode 100644
index 00000000..222f0e67
--- /dev/null
+++ b/tests/python_on_whales/components/jsons/containers/8.json
@@ -0,0 +1,212 @@
+{
+    "Id": "2285ccaaf2b659c6e578b5205860ac373c45dd7aec4a5216525b27f10b70cd35",
+    "Created": "2021-01-28T13:43:11.987745178Z",
+    "Path": "nvidia-smi",
+    "Args": [],
+    "State": {
+        "Status": "exited",
+        "Running": false,
+        "Paused": false,
+        "Restarting": false,
+        "OOMKilled": false,
+        "Dead": false,
+        "Pid": 0,
+        "ExitCode": 0,
+        "Error": "",
+        "StartedAt": "2021-01-28T13:43:12.363548109Z",
+        "FinishedAt": "2021-01-28T13:43:12.440901236Z"
+    },
+    "Image": "sha256:2ec708416bb815ced7cd5288b0fd11b2db2e91cc442ab583e4bf596468f7ca7d",
+    "ResolvConfPath": "/var/lib/docker/containers/2285ccaaf2b659c6e578b5205860ac373c45dd7aec4a5216525b27f10b70cd35/resolv.conf",
+    "HostnamePath": "/var/lib/docker/containers/2285ccaaf2b659c6e578b5205860ac373c45dd7aec4a5216525b27f10b70cd35/hostname",
+    "HostsPath": "/var/lib/docker/containers/2285ccaaf2b659c6e578b5205860ac373c45dd7aec4a5216525b27f10b70cd35/hosts",
+    "LogPath": "/var/lib/docker/containers/2285ccaaf2b659c6e578b5205860ac373c45dd7aec4a5216525b27f10b70cd35/2285ccaaf2b659c6e578b5205860ac373c45dd7aec4a5216525b27f10b70cd35-json.log",
+    "Name": "/some-name",
+    "RestartCount": 0,
+    "Driver": "overlay2",
+    "Platform": "linux",
+    "MountLabel": "",
+    "ProcessLabel": "",
+    "AppArmorProfile": "docker-default",
+    "ExecIDs": null,
+    "HostConfig": {
+        "Binds": null,
+        "ContainerIDFile": "",
+        "LogConfig": {
+            "Type": "json-file",
+            "Config": {}
+        },
+        "NetworkMode": "default",
+        "PortBindings": {},
+        "RestartPolicy": {
+            "Name": "no",
+            "MaximumRetryCount": 0
+        },
+        "AutoRemove": false,
+        "VolumeDriver": "",
+        "VolumesFrom": null,
+        "CapAdd": null,
+        "CapDrop": null,
+        "Capabilities": null,
+        "Dns": [],
+        "DnsOptions": [],
+        "DnsSearch": [],
+        "ExtraHosts": null,
+        "GroupAdd": null,
+        "IpcMode": "private",
+        "Cgroup": "",
+        "Links": null,
+        "OomScoreAdj": 0,
+        "PidMode": "",
+        "Privileged": false,
+        "PublishAllPorts": false,
+        "ReadonlyRootfs": false,
+        "SecurityOpt": null,
+        "UTSMode": "",
+        "UsernsMode": "",
+        "ShmSize": 67108864,
+        "Runtime": "runc",
+        "ConsoleSize": [
+            0,
+            0
+        ],
+        "Isolation": "",
+        "CpuShares": 0,
+        "Memory": 0,
+        "NanoCpus": 0,
+        "CgroupParent": "",
+        "BlkioWeight": 0,
+        "BlkioWeightDevice": [],
+        "BlkioDeviceReadBps": null,
+        "BlkioDeviceWriteBps": null,
+        "BlkioDeviceReadIOps": null,
+        "BlkioDeviceWriteIOps": null,
+        "CpuPeriod": 0,
+        "CpuQuota": 0,
+        "CpuRealtimePeriod": 0,
+        "CpuRealtimeRuntime": 0,
+        "CpusetCpus": "",
+        "CpusetMems": "",
+        "Devices": [],
+        "DeviceCgroupRules": null,
+        "DeviceRequests": [
+            {
+                "Driver": "",
+                "Count": -1,
+                "DeviceIDs": null,
+                "Capabilities": [
+                    [
+                        "gpu"
+                    ]
+                ],
+                "Options": {}
+            }
+        ],
+        "KernelMemory": 0,
+        "KernelMemoryTCP": 0,
+        "MemoryReservation": 0,
+        "MemorySwap": 0,
+        "MemorySwappiness": null,
+        "OomKillDisable": false,
+        "PidsLimit": null,
+        "Ulimits": null,
+        "CpuCount": 0,
+        "CpuPercent": 0,
+        "IOMaximumIOps": 0,
+        "IOMaximumBandwidth": 0,
+        "MaskedPaths": [
+            "/proc/asound",
+            "/proc/acpi",
+            "/proc/kcore",
+            "/proc/keys",
+            "/proc/latency_stats",
+            "/proc/timer_list",
+            "/proc/timer_stats",
+            "/proc/sched_debug",
+            "/proc/scsi",
+            "/sys/firmware"
+        ],
+        "ReadonlyPaths": [
+            "/proc/bus",
+            "/proc/fs",
+            "/proc/irq",
+            "/proc/sys",
+            "/proc/sysrq-trigger"
+        ]
+    },
+    "GraphDriver": {
+        "Data": {
+            "LowerDir": "/var/lib/docker/overlay2/4ee87821f6a31b89ca0a40a192b676c8a359791d4207813438fdf1985ba57883-init/diff:/var/lib/docker/overlay2/3034b1ee03d63cbb8306b0c54682c5ddb1c3ed9d8857e28ab24b06b5a33adf63/diff:/var/lib/docker/overlay2/1b2e1c4d6668caef692834c103924c3a8623337bf4f7332d64a99bc24c7d402a/diff:/var/lib/docker/overlay2/d4d8dfd4da2ff2a872891e2e8bb99a8a1447c189556c605300f3c333b4c517cd/diff:/var/lib/docker/overlay2/9b14352344f5efefaa07a629bcb2295aff28840a0dacd2f0b84b27742d5d540b/diff:/var/lib/docker/overlay2/669cb006e9d8c9c9c26505f634d3f60dc9006997cf47ae09797f52f2ead14a66/diff:/var/lib/docker/overlay2/4c0fabdc58c1547196a030311db945f50c9a3beda6725b3cbe8b8aa1d2080b92/diff:/var/lib/docker/overlay2/f2d04e534f2dfd034b76bc9df09b8605819604dbc4a81d2c4848965173d9d56b/diff",
+            "MergedDir": "/var/lib/docker/overlay2/4ee87821f6a31b89ca0a40a192b676c8a359791d4207813438fdf1985ba57883/merged",
+            "UpperDir": "/var/lib/docker/overlay2/4ee87821f6a31b89ca0a40a192b676c8a359791d4207813438fdf1985ba57883/diff",
+            "WorkDir": "/var/lib/docker/overlay2/4ee87821f6a31b89ca0a40a192b676c8a359791d4207813438fdf1985ba57883/work"
+        },
+        "Name": "overlay2"
+    },
+    "Mounts": [],
+    "Config": {
+        "Hostname": "2285ccaaf2b6",
+        "Domainname": "",
+        "User": "",
+        "AttachStdin": false,
+        "AttachStdout": true,
+        "AttachStderr": true,
+        "Tty": false,
+        "OpenStdin": false,
+        "StdinOnce": false,
+        "Env": [
+            "PATH=/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
+            "LD_LIBRARY_PATH=/usr/local/nvidia/lib:/usr/local/nvidia/lib64",
+            "NVIDIA_VISIBLE_DEVICES=all",
+            "NVIDIA_DRIVER_CAPABILITIES=compute,utility",
+            "NVIDIA_REQUIRE_CUDA=cuda>=11.0 brand=tesla,driver>=418,driver<419 brand=tesla,driver>=440,driver<441"
+        ],
+        "Cmd": [
+            "nvidia-smi"
+        ],
+        "Image": "nvidia/cuda:11.0-base",
+        "Volumes": null,
+        "WorkingDir": "",
+        "Entrypoint": null,
+        "OnBuild": null,
+        "Labels": {
+            "maintainer": "NVIDIA CORPORATION <cudatools@nvidia.com>"
+        }
+    },
+    "NetworkSettings": {
+        "Bridge": "",
+        "SandboxID": "a95b7394d56e7dc528c66b47467f04ae31d99c8e5e93e292cc32066ca03afaaf",
+        "HairpinMode": false,
+        "LinkLocalIPv6Address": "",
+        "LinkLocalIPv6PrefixLen": 0,
+        "Ports": {},
+        "SandboxKey": "/var/run/docker/netns/a95b7394d56e",
+        "SecondaryIPAddresses": null,
+        "SecondaryIPv6Addresses": null,
+        "EndpointID": "",
+        "Gateway": "",
+        "GlobalIPv6Address": "",
+        "GlobalIPv6PrefixLen": 0,
+        "IPAddress": "",
+        "IPPrefixLen": 0,
+        "IPv6Gateway": "",
+        "MacAddress": "",
+        "Networks": {
+            "bridge": {
+                "IPAMConfig": null,
+                "Links": null,
+                "Aliases": null,
+                "NetworkID": "24895a7db1c415556df257767d1ca9284e49730ca11b72a550b945da2c11d9d7",
+                "EndpointID": "",
+                "Gateway": "",
+                "IPAddress": "",
+                "IPPrefixLen": 0,
+                "IPv6Gateway": "",
+                "GlobalIPv6Address": "",
+                "GlobalIPv6PrefixLen": 0,
+                "MacAddress": "",
+                "DriverOpts": null
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/tests/python_on_whales/components/jsons/containers/9.json b/tests/python_on_whales/components/jsons/containers/9.json
new file mode 100644
index 00000000..b057a916
--- /dev/null
+++ b/tests/python_on_whales/components/jsons/containers/9.json
@@ -0,0 +1,215 @@
+{
+    "Id": "3abc69a6cbd7afca7dab6d09a02e5c481f8bc593ffc1c6f95d7d6ea81c56356e",
+    "Created": "2021-01-28T13:45:54.913913553Z",
+    "Path": "/bin/bash",
+    "Args": [],
+    "State": {
+        "Status": "exited",
+        "Running": false,
+        "Paused": false,
+        "Restarting": false,
+        "OOMKilled": false,
+        "Dead": false,
+        "Pid": 0,
+        "ExitCode": 0,
+        "Error": "",
+        "StartedAt": "2021-01-28T13:46:03.656071979Z",
+        "FinishedAt": "2021-01-28T13:46:03.712954141Z"
+    },
+    "Image": "sha256:d79ad2663f3912284ecc2e5348fd014087556c79555a0a9db8ea07ec7b259b09",
+    "ResolvConfPath": "/var/lib/docker/containers/3abc69a6cbd7afca7dab6d09a02e5c481f8bc593ffc1c6f95d7d6ea81c56356e/resolv.conf",
+    "HostnamePath": "/var/lib/docker/containers/3abc69a6cbd7afca7dab6d09a02e5c481f8bc593ffc1c6f95d7d6ea81c56356e/hostname",
+    "HostsPath": "/var/lib/docker/containers/3abc69a6cbd7afca7dab6d09a02e5c481f8bc593ffc1c6f95d7d6ea81c56356e/hosts",
+    "LogPath": "/var/lib/docker/containers/3abc69a6cbd7afca7dab6d09a02e5c481f8bc593ffc1c6f95d7d6ea81c56356e/3abc69a6cbd7afca7dab6d09a02e5c481f8bc593ffc1c6f95d7d6ea81c56356e-json.log",
+    "Name": "/some-name2",
+    "RestartCount": 0,
+    "Driver": "overlay2",
+    "Platform": "linux",
+    "MountLabel": "",
+    "ProcessLabel": "",
+    "AppArmorProfile": "docker-default",
+    "ExecIDs": null,
+    "HostConfig": {
+        "Binds": null,
+        "ContainerIDFile": "",
+        "LogConfig": {
+            "Type": "json-file",
+            "Config": {}
+        },
+        "NetworkMode": "default",
+        "PortBindings": {},
+        "RestartPolicy": {
+            "Name": "no",
+            "MaximumRetryCount": 0
+        },
+        "AutoRemove": false,
+        "VolumeDriver": "",
+        "VolumesFrom": null,
+        "CapAdd": null,
+        "CapDrop": null,
+        "Capabilities": null,
+        "Dns": [],
+        "DnsOptions": [],
+        "DnsSearch": [],
+        "ExtraHosts": null,
+        "GroupAdd": null,
+        "IpcMode": "private",
+        "Cgroup": "",
+        "Links": null,
+        "OomScoreAdj": 0,
+        "PidMode": "",
+        "Privileged": false,
+        "PublishAllPorts": false,
+        "ReadonlyRootfs": false,
+        "SecurityOpt": null,
+        "UTSMode": "",
+        "UsernsMode": "",
+        "ShmSize": 67108864,
+        "Runtime": "runc",
+        "ConsoleSize": [
+            0,
+            0
+        ],
+        "Isolation": "",
+        "CpuShares": 0,
+        "Memory": 0,
+        "NanoCpus": 0,
+        "CgroupParent": "",
+        "BlkioWeight": 0,
+        "BlkioWeightDevice": [],
+        "BlkioDeviceReadBps": null,
+        "BlkioDeviceWriteBps": null,
+        "BlkioDeviceReadIOps": null,
+        "BlkioDeviceWriteIOps": null,
+        "CpuPeriod": 0,
+        "CpuQuota": 0,
+        "CpuRealtimePeriod": 0,
+        "CpuRealtimeRuntime": 0,
+        "CpusetCpus": "",
+        "CpusetMems": "",
+        "Devices": [],
+        "DeviceCgroupRules": null,
+        "DeviceRequests": [
+            {
+                "Driver": "",
+                "Count": -1,
+                "DeviceIDs": null,
+                "Capabilities": [
+                    [
+                        "gpu"
+                    ]
+                ],
+                "Options": {}
+            }
+        ],
+        "KernelMemory": 0,
+        "KernelMemoryTCP": 0,
+        "MemoryReservation": 0,
+        "MemorySwap": 0,
+        "MemorySwappiness": null,
+        "OomKillDisable": false,
+        "PidsLimit": null,
+        "Ulimits": null,
+        "CpuCount": 0,
+        "CpuPercent": 0,
+        "IOMaximumIOps": 0,
+        "IOMaximumBandwidth": 0,
+        "MaskedPaths": [
+            "/proc/asound",
+            "/proc/acpi",
+            "/proc/kcore",
+            "/proc/keys",
+            "/proc/latency_stats",
+            "/proc/timer_list",
+            "/proc/timer_stats",
+            "/proc/sched_debug",
+            "/proc/scsi",
+            "/sys/firmware"
+        ],
+        "ReadonlyPaths": [
+            "/proc/bus",
+            "/proc/fs",
+            "/proc/irq",
+            "/proc/sys",
+            "/proc/sysrq-trigger"
+        ]
+    },
+    "GraphDriver": {
+        "Data": {
+            "LowerDir": "/var/lib/docker/overlay2/564c3d0c646eebe03696fd1037c7a94a4b1ac4d874f568151886fac723fb5a87-init/diff:/var/lib/docker/overlay2/d99e43813bc3e3aa7a68cf4d8e74f580679b0842434f800fa5198f432633dec7/diff:/var/lib/docker/overlay2/c807104f23969ff561f1c8e365c3cbe3ec22db883dc296f0342507bfc5bb5608/diff:/var/lib/docker/overlay2/855144b677656aeb6a27e590e9328a0a52f6fe9ee46b3b0de75b5a546509f768/diff:/var/lib/docker/overlay2/a7dd9135b9c17a99502d81f533fa7505e6cb5dde366ab5d3d9022dc91fda7c94/diff:/var/lib/docker/overlay2/ea35f751b88651e34ee00674b79d95e2640a10ea32dd37b517103f0637d09864/diff:/var/lib/docker/overlay2/e9cb283c0df581a5d76b271bd788b34544e030454f46c00de3a683f8afa8de81/diff:/var/lib/docker/overlay2/e0db9c9629d0513bac5225a6924b4e08870f76b2e284652697c82247156ff61a/diff:/var/lib/docker/overlay2/3ddc2fc23f0330642e7f39dde1b4268a5ea4a515c7d1f98dc54e1c7ad6bb0eb2/diff:/var/lib/docker/overlay2/09ab599dfa099b9b26077d8f155ab1f998d47d856e6f63afa326e49a086f3d51/diff:/var/lib/docker/overlay2/3687ad1bfc74e72e48437188756b435e885793d1dc917010529560907baba5a7/diff:/var/lib/docker/overlay2/c75c40ef127a2cb8b020f8aa10c1d8bc106f2b52cde06543668dafeff060d4eb/diff:/var/lib/docker/overlay2/83325e9835dde858bee540dcb4ddb62378d01af05f0553b1c93121d5b12c3c39/diff:/var/lib/docker/overlay2/963e14e2de757429b4e0d0c4ac6295d17b1bacb4fb268dd81a9aa0987367e1ac/diff:/var/lib/docker/overlay2/7fed30658fe9f6f83f00752a9388aa0154ce56fd81cf7d35a0b584b3dbb0bc48/diff:/var/lib/docker/overlay2/b2a073f2db6286a43649b9082851e082bad4e6a2686782904139c28434ad658c/diff",
+            "MergedDir": "/var/lib/docker/overlay2/564c3d0c646eebe03696fd1037c7a94a4b1ac4d874f568151886fac723fb5a87/merged",
+            "UpperDir": "/var/lib/docker/overlay2/564c3d0c646eebe03696fd1037c7a94a4b1ac4d874f568151886fac723fb5a87/diff",
+            "WorkDir": "/var/lib/docker/overlay2/564c3d0c646eebe03696fd1037c7a94a4b1ac4d874f568151886fac723fb5a87/work"
+        },
+        "Name": "overlay2"
+    },
+    "Mounts": [],
+    "Config": {
+        "Hostname": "3abc69a6cbd7",
+        "Domainname": "",
+        "User": "",
+        "AttachStdin": false,
+        "AttachStdout": true,
+        "AttachStderr": true,
+        "Tty": false,
+        "OpenStdin": false,
+        "StdinOnce": false,
+        "Env": [
+            "PATH=/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
+            "CUDA_VERSION=10.1.243",
+            "CUDA_PKG_VERSION=10-1=10.1.243-1",
+            "LD_LIBRARY_PATH=/usr/local/cuda/extras/CUPTI/lib64:/usr/local/cuda/lib64:/usr/local/nvidia/lib:/usr/local/nvidia/lib64",
+            "NVIDIA_VISIBLE_DEVICES=all",
+            "NVIDIA_DRIVER_CAPABILITIES=compute,utility",
+            "NVIDIA_REQUIRE_CUDA=cuda>=10.1 brand=tesla,driver>=396,driver<397 brand=tesla,driver>=410,driver<411 brand=tesla,driver>=418,driver<419",
+            "LANG=C.UTF-8"
+        ],
+        "Cmd": [
+            "/bin/bash"
+        ],
+        "Image": "tensorflow/tensorflow:2.3.2-gpu",
+        "Volumes": null,
+        "WorkingDir": "",
+        "Entrypoint": null,
+        "OnBuild": null,
+        "Labels": {
+            "maintainer": "NVIDIA CORPORATION <cudatools@nvidia.com>"
+        }
+    },
+    "NetworkSettings": {
+        "Bridge": "",
+        "SandboxID": "7f61334dbb199e3e777c264d1ba73c72de26d58d098bdbe917e78e901ffeedfc",
+        "HairpinMode": false,
+        "LinkLocalIPv6Address": "",
+        "LinkLocalIPv6PrefixLen": 0,
+        "Ports": {},
+        "SandboxKey": "/var/run/docker/netns/7f61334dbb19",
+        "SecondaryIPAddresses": null,
+        "SecondaryIPv6Addresses": null,
+        "EndpointID": "",
+        "Gateway": "",
+        "GlobalIPv6Address": "",
+        "GlobalIPv6PrefixLen": 0,
+        "IPAddress": "",
+        "IPPrefixLen": 0,
+        "IPv6Gateway": "",
+        "MacAddress": "",
+        "Networks": {
+            "bridge": {
+                "IPAMConfig": null,
+                "Links": null,
+                "Aliases": null,
+                "NetworkID": "24895a7db1c415556df257767d1ca9284e49730ca11b72a550b945da2c11d9d7",
+                "EndpointID": "",
+                "Gateway": "",
+                "IPAddress": "",
+                "IPPrefixLen": 0,
+                "IPv6Gateway": "",
+                "GlobalIPv6Address": "",
+                "GlobalIPv6PrefixLen": 0,
+                "MacAddress": "",
+                "DriverOpts": null
+            }
+        }
+    }
+}
\ No newline at end of file