When a build failed in a previous version of Docker, I could count on output like this:
---> 8f9941c285e2
Removing intermediate container 9a543227b6b8
Step 6/21 : RUN adduser -s /bin/sh -h /home/user -D user && mkdir -p /whl && chown -R user:user /srv /whl
---> Running in 93a90935664d
---> 7f700d063b68
Removing intermediate container 93a90935664d
If the step failed, the intermediate image 7f700d063b68 would still exist. I could docker run it and try to figure out what happened.
But now, using docker client 20.10.2 I only get this output:
=> [dev 1/3] COPY --from=build /whl /whl
.1s
=> [dev 2/3] COPY --chown=user:user . .
.9s
=> ERROR [dev 3/3] RUN python3 -m pip install --find-links /whl -e ".[bpython,test]" && command -v bpython
.3s
I don't see anything in the docker build --help output that would seem to provide more debuggability here. docker build doesn't accept --debug or --verbose flags.
How can I discover what the last successful image/layer was, so I can enter it and debug with context?