Skip to content

Commit

Permalink
Don't use the full registry url in FROM on Tumbleweed
Browse files Browse the repository at this point in the history
  • Loading branch information
dcermak committed Sep 20, 2024
1 parent 146630d commit 34e9080
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/bci_build/package/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -834,10 +834,14 @@ def dockerfile_from_line(self) -> str:
return ""

if self.from_target_image:
return (
f"FROM {self.base_image_registry}/{self.from_target_image} AS target\n"
f"FROM {self._from_image} AS builder"
)
# use the full registry URL in FROM on SLE,
# but on TW we must not do this
if self.os_version.is_tumbleweed:
target = self.from_target_image
else:
target = f"{self.base_image_registry}/{self.from_target_image}"

return f"FROM {target} AS target\nFROM {self._from_image} AS builder"

return f"FROM {self._from_image}"

Expand Down

0 comments on commit 34e9080

Please sign in to comment.