summaryrefslogtreecommitdiffstats
path: root/sources.py
diff options
context:
space:
mode:
Diffstat (limited to 'sources.py')
-rw-r--r--sources.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/sources.py b/sources.py
index 7045a29..a7f1eb0 100644
--- a/sources.py
+++ b/sources.py
@@ -55,8 +55,9 @@ class DockerSource:
self.username = username
self.password = password
self.insecure = insecure
- if self.image.startswith('/'):
- self.image = self.image[1:]
+ if self.image and not self.image.startswith('/'):
+ self.image = '/' + self.image
+ self.url = "docker://" + self.registry + self.image
def unpack(self, dest):
tmpDest = tempfile.mkdtemp('virt-bootstrap')
@@ -67,7 +68,7 @@ class DockerSource:
# they should place the certificates in the system
# folders for broader enablement
cmd = ["skopeo", "copy",
- "docker://%s/%s" % (self.registry, self.image),
+ self.url,
"dir:%s" % tmpDest]
if self.insecure:
cmd.append('--src-tls-verify=false')