docker-py icon indicating copy to clipboard operation
docker-py copied to clipboard

Question: What is the equivalent in docker-py to "--progress=plain" or BUILDKIT_PROGRESS=plain?

Open JustGitting opened this issue 5 months ago • 0 comments

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.

JustGitting avatar Aug 01 '25 00:08 JustGitting