Skip to content

Commit

Permalink
check Labels as well as Config keys to make sure volumes get detected…
Browse files Browse the repository at this point in the history
… during install
  • Loading branch information
sebovzeoueb committed Dec 8, 2024
1 parent 417c672 commit 750c7c7
Showing 1 changed file with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,17 @@ def item_exists(item_name, item_type):
parsed = json.loads(result.stdout)
try:
# ensure the container was created by the concierge docker compose
return (
parsed[0]["Config"]["Labels"]["com.docker.compose.project"]
== "concierge"
)
if parsed[0]["Labels"]["com.docker.compose.project"] == "concierge":
return True

except KeyError:
return False
try:
return (
parsed[0]["Config"]["Labels"]["com.docker.compose.project"]
== "concierge"
)
except KeyError:
return False
except subprocess.CalledProcessError:
return False

Expand Down

0 comments on commit 750c7c7

Please sign in to comment.