I need to debug the cause of a build failure using docker-py when building from a dockerfile that was created dynamically within python.
For example, the error I'm getting is:
...
Step 4/14 : RUN pip install uv
Step 5/14 : COPY .requirements .
Step 6/14 : RUN uv pip install --no-cache-dir -r .requirements
...
RuntimeError: Docker error: The command '/bin/sh -c uv pip install --no-cache-dir -r .requirements' returned a non-zero code: 1.
The docker daemon logs (with debug=true in daemon.json) doesn't show anything obvious.
If using the CLI, we can add docker build --progress=plain ... or use export BUILDKIT_PROGRESS=plain to show the details.
However, I want to do this within docker-py and it's not obvious how to do this looking at the docs.
Is there a way to enable the equivalent of "--progress=plain"| " BUILDKIT_PROGRESS=plain" in docker-py?
Thanks for any suggestions.