Skip to content
This repository was archived by the owner on Oct 6, 2025. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions src/sc_docker/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -456,9 +456,17 @@ def _generate_container_name(self, image_name: str) -> str:

def _parse_image_reference(self, image: str) -> tuple[str, str]:
"""Split image reference into registry url and image name"""
last_slash = image.rfind("/")
registry_url = image[:last_slash]
image_name = image[last_slash+1:]
registry_url = None
for url in self.docker_config:
if image.startswith(url):
registry_url = url
image_name = image.replace(f"{url}/", "", 1)
break

if registry_url == None:
last_slash = image.rfind("/")
registry_url = image[:last_slash]
image_name = image[last_slash+1:]
return registry_url, image_name

# ──────────────────────── DOCKER RUN HELPERS ────────────────────────
Expand Down