Skip to content

Commit

Permalink
Merge pull request #1413 from yuvipanda/push
Browse files Browse the repository at this point in the history
Simulate json output from docker buildx build
  • Loading branch information
yuvipanda authored Feb 14, 2025
2 parents 13cbc9e + b6fa2d4 commit 80d186a
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions repo2docker/docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class DockerEngine(ContainerEngine):
https://docker-py.readthedocs.io/en/4.2.0/api.html#module-docker.api.build
"""

string_output = True
string_output = False

extra_init_args = Dict(
{},
Expand Down Expand Up @@ -141,12 +141,18 @@ def build(

args += [d]

yield from execute_cmd(args, True)
for line in execute_cmd(args, True):
# Simulate structured JSON output from buildx build, since we
# do get structured json output from pushing and running
yield {"stream": line}
else:
# Assume 'path' is passed in
args += [path]

yield from execute_cmd(args, True)
for line in execute_cmd(args, True):
# Simulate structured JSON output from buildx build, since we
# do get structured json output from pushing and running
yield {"stream": line}

def images(self):
images = self._apiclient.images()
Expand Down

0 comments on commit 80d186a

Please sign in to comment.