Skip to content

Commit

Permalink
Improve error reporting on build errors
Browse files Browse the repository at this point in the history
tfoote committed Jan 25, 2025
1 parent 9b8230d commit 96593b1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/rocker/core.py
Original file line number Diff line number Diff line change
@@ -277,7 +277,7 @@ def docker_build(docker_client = None, output_callback = None, **kwargs):
if image_id:
return canonicalize_image_id(image_id, docker_client=docker_client)
else:
print('Output stream from docker_build finished but no image_id detected')
print('Docker Build Failed: Output stream from docker_build finished but no image_id detected.')
return None

def docker_remove_image(
@@ -380,6 +380,8 @@ def build(self, **kwargs):
self.built = True
return 0
else:
print(f'Failed to build dockerfile:\n"""\n{self.dockerfile}\n"""')
print(f'Arguments were: {arguments}')
return 2

except docker.errors.APIError as ex:

0 comments on commit 96593b1

Please sign in to comment.