-
Notifications
You must be signed in to change notification settings - Fork 497
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How do I get the SHA / Container ID of failed builds #424
Comments
I'm not sure I understand the question. If the build failed, there is no container to inspect. |
There should be an intermediate container. At least it was earlier (and may still be in the stable release). From "Examples/Build with PATH" $ docker build .
Uploading context 10240 bytes
Step 1/3 : FROM busybox
Pulling repository busybox
---> e9aa60c60128MB/2.284 MB (100%) endpoint: https://cdn-registry-1.docker.io/v1/
Step 2/3 : RUN ls -lh /
---> Running in 9c9e81692ae9
total 24
drwxr-xr-x 2 root root 4.0K Mar 12 2013 bin
drwxr-xr-x 5 root root 4.0K Oct 19 00:19 dev
drwxr-xr-x 2 root root 4.0K Oct 19 00:19 etc
drwxr-xr-x 2 root root 4.0K Nov 15 23:34 lib
lrwxrwxrwx 1 root root 3 Mar 12 2013 lib64 -> lib
dr-xr-xr-x 116 root root 0 Nov 15 23:34 proc
lrwxrwxrwx 1 root root 3 Mar 12 2013 sbin -> bin
dr-xr-xr-x 13 root root 0 Nov 15 23:34 sys
drwxr-xr-x 2 root root 4.0K Mar 12 2013 tmp
drwxr-xr-x 2 root root 4.0K Nov 15 23:34 usr
---> b35f4035db3f
Step 3/3 : CMD echo Hello world
---> Running in 02071fceb21b
---> f52f38b7823e
Successfully built f52f38b7823e
Removing intermediate container 9c9e81692ae9
Removing intermediate container 02071fceb21b In my case, one of the Let's say, that in the above example |
Apologies, I didn't know that was possible. We recently switched from legacy build to buildkit, which may explain the difference. If you switch back to legacy build in Preferences-Engine, do you get the behaviour you were hoping for? |
Yes. Though, I'd like to have the option for see the container ID in BuildKit as well ( For one thing, switching back takes some time (i.e. restarting Docker), and the image has to be rebuilt (at least, that's what happened now). |
OK, I'm going to move this ticket into the buildx repo as that code is all upstream of us. |
Follow updates on this in moby/buildkit#1472 . Current best workaround is to set |
Expected behavior
Be able to find the container ID of failed builds, so that I can log enter them interactively, and debug them.
Actual behavior
=> ERROR [build x/n] RUN <failed command>
Information
Diagnostic logs
Steps to reproduce the behavior
The text was updated successfully, but these errors were encountered: