Skip to content

Commit

Permalink
Handle multiple image IDs in the image-ids.txt file.
Browse files Browse the repository at this point in the history
Docker Desktop 4.30.0 uses the containerd image store by default, which
generates different IDs for the images, and as a result breaks the logic
we are using when verifying the images IDs are present.

Now, multiple IDs can be stored in the `image-id.txt` file.

Fixes #933
  • Loading branch information
apyrgio authored and almet committed Sep 30, 2024
1 parent bd2dc0e commit 4423fc6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dangerzone/isolation_provider/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def is_container_installed() -> bool:
"""
# Get the image id
with open(get_resource_path("image-id.txt")) as f:
expected_image_id = f.read().strip()
expected_image_ids = f.read().strip().split()

# See if this image is already installed
installed = False
Expand All @@ -212,7 +212,7 @@ def is_container_installed() -> bool:
)
found_image_id = found_image_id.strip()

if found_image_id == expected_image_id:
if found_image_id in expected_image_ids:
installed = True
elif found_image_id == "":
pass
Expand Down

0 comments on commit 4423fc6

Please sign in to comment.