Add docker daemon support
This commit is contained in:
parent
77439b6dc3
commit
a80e3fb48c
@ -60,9 +60,11 @@ class Image:
|
|||||||
setattr(self, k, v)
|
setattr(self, k, v)
|
||||||
|
|
||||||
# docker.io currently has issues with oci format
|
# docker.io currently has issues with oci format
|
||||||
self.format = format or 'oci'
|
|
||||||
if self.registry == 'docker.io':
|
if self.registry == 'docker.io':
|
||||||
self.format = 'docker'
|
self.backend = 'docker'
|
||||||
|
|
||||||
|
if not self.format:
|
||||||
|
self.format = 'docker' if self.backend == 'docker' else 'oci'
|
||||||
|
|
||||||
# filter out tags which resolved to None
|
# filter out tags which resolved to None
|
||||||
self.tags = [t for t in self.tags if t]
|
self.tags = [t for t in self.tags if t]
|
||||||
|
|||||||
@ -145,7 +145,18 @@ class Buildah(Target):
|
|||||||
|
|
||||||
async def commit(self):
|
async def commit(self):
|
||||||
await self.parent.exec(
|
await self.parent.exec(
|
||||||
f'buildah commit {self.ctr} {self.image.repository}:final'
|
'buildah',
|
||||||
|
'commit',
|
||||||
|
f'--format={self.image.format}',
|
||||||
|
self.ctr,
|
||||||
|
f'{self.image.repository}:final',
|
||||||
|
)
|
||||||
|
if self.image.backend == 'docker':
|
||||||
|
await self.parent.exec(
|
||||||
|
'buildah',
|
||||||
|
'push',
|
||||||
|
f'{self.image.repository}:final',
|
||||||
|
f'docker-daemon:{self.image.repository}:latest'
|
||||||
)
|
)
|
||||||
|
|
||||||
ENV_TAGS = (
|
ENV_TAGS = (
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user