diff --git a/lib/galaxy/tool_util/deps/requirements.py b/lib/galaxy/tool_util/deps/requirements.py index 53fdb51d1657..d2fbb249aa63 100644 --- a/lib/galaxy/tool_util/deps/requirements.py +++ b/lib/galaxy/tool_util/deps/requirements.py @@ -189,11 +189,17 @@ def __init__( ) -> None: # Force to lowercase because container image names must be lowercase. # Cached singularity images include the path on disk, so only lowercase - # the image identifier portion. + # the image identifier portion. Note, the tag can also contain upper case + # letters. self.identifier = identifier if identifier: parts = identifier.rsplit(os.sep, 1) - parts[-1] = parts[-1].lower() + if ":" in parts[-1]: + name, tag = parts[-1].rsplit(":", 1) + parts[-1] = f"{name.lower()}:{tag}" + else: + parts[-1] = parts[-1].lower() + self.identifier = os.sep.join(parts) self.type = type self.resolve_dependencies = resolve_dependencies