Make the commit id clear like Docker#2124
Conversation
|
@vrothberg fyi and/or PTAL |
| return "", nil, err | ||
| } | ||
|
|
||
| logrus.Debugf("printing final image id %q", imageID) |
There was a problem hiding this comment.
I've added this debug in my own self interest. This is the 3rd time in the past few months that I've spent 10 or more minutes looking for where the final image id is printed in the code. Hopefully going forward I'll remember to run the bud command in debug and will be able to locate it more quickly.
imagebuildah/stage_executor.go
Outdated
| logImageID := func(imgID string) { | ||
| if s.executor.iidfile == "" { | ||
| fmt.Fprintf(s.executor.out, "%s\n", imgID) | ||
| fmt.Fprintf(s.executor.out, "--> %s\n", imgID[0:11]) |
There was a problem hiding this comment.
ooops, forgot a length check, will add .
c7eb9cc to
f277e48
Compare
|
Are there any man page examples that need to be updated? |
vrothberg
left a comment
There was a problem hiding this comment.
Other than Dan's man page question, LGTM 👍 Thanks for the ping!
|
We don't list the output of the build commands in the man page that I can see. In the tutorials we list some of it, but remove most of the output with a "{output removed for brevity}" kind of tag. So I don't think there are any changes to be made as far as that's concerned. |
|
📌 Commit f277e48 has been approved by |
Using this Dockerfile: ``` FROM alpine AS tommer ``` Docker does: ``` Sending build context to Docker daemon 17.92kB Step 1/1 : FROM alpine AS tommer latest: Pulling from library/alpine c9b1b535fdd9: Pull complete Digest: sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d Status: Downloaded newer image for alpine:latest ---> e7d92cdc71fe Successfully built e7d92cdc71fe ``` While Buildah does: ``` STEP 1: FROM alpine AS tommer STEP 2: COMMIT tom e7d92cdc71feacf90708cb59182d0df1b911f8ae022d29e8e95d75ca6a99776a e7d92cdc71feacf90708cb59182d0df1b911f8ae022d29e8e95d75ca6a99776a ``` Per user requests, we've over time eliminateed some of the "noisier" output that Docker has, and that's now led to some confusion when we show an intermediate image id (after the commit) and then as in the case, the same final image id immediately afterwards. We display only the full final image id to make scripting easier per other user requests. To aid with this, this pr will cause the intermediate image to be displayed after an `-->` like Docker and will also show the 12 character short id. If the `--quiet` option is used, this shorter id will not be displayed, only the final longer one. New behavior: ``` STEP 1: FROM alpine AS tommer STEP 2: COMMIT tom --> e7d92cdc71f e7d92cdc71feacf90708cb59182d0df1b911f8ae022d29e8e95d75ca6a99776a ``` Fixes: containers/podman#5012 Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com> Closes: #2124 Approved by: vrothberg
|
💔 Test failed - status-travis |
|
@rh-atomic-bot retry |
Using this Dockerfile: ``` FROM alpine AS tommer ``` Docker does: ``` Sending build context to Docker daemon 17.92kB Step 1/1 : FROM alpine AS tommer latest: Pulling from library/alpine c9b1b535fdd9: Pull complete Digest: sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d Status: Downloaded newer image for alpine:latest ---> e7d92cdc71fe Successfully built e7d92cdc71fe ``` While Buildah does: ``` STEP 1: FROM alpine AS tommer STEP 2: COMMIT tom e7d92cdc71feacf90708cb59182d0df1b911f8ae022d29e8e95d75ca6a99776a e7d92cdc71feacf90708cb59182d0df1b911f8ae022d29e8e95d75ca6a99776a ``` Per user requests, we've over time eliminateed some of the "noisier" output that Docker has, and that's now led to some confusion when we show an intermediate image id (after the commit) and then as in the case, the same final image id immediately afterwards. We display only the full final image id to make scripting easier per other user requests. To aid with this, this pr will cause the intermediate image to be displayed after an `-->` like Docker and will also show the 12 character short id. If the `--quiet` option is used, this shorter id will not be displayed, only the final longer one. New behavior: ``` STEP 1: FROM alpine AS tommer STEP 2: COMMIT tom --> e7d92cdc71f e7d92cdc71feacf90708cb59182d0df1b911f8ae022d29e8e95d75ca6a99776a ``` Fixes: containers/podman#5012 Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com> Closes: #2124 Approved by: vrothberg
|
💔 Test failed - status-papr |
|
I think I'll have a merge conflict with #2149. Once that's in I'll rebase and work on this one again. |
Using this Dockerfile: ``` FROM alpine AS tommer ``` Docker does: ``` Sending build context to Docker daemon 17.92kB Step 1/1 : FROM alpine AS tommer latest: Pulling from library/alpine c9b1b535fdd9: Pull complete Digest: sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d Status: Downloaded newer image for alpine:latest ---> e7d92cdc71fe Successfully built e7d92cdc71fe ``` While Buildah does: ``` STEP 1: FROM alpine AS tommer STEP 2: COMMIT tom e7d92cdc71feacf90708cb59182d0df1b911f8ae022d29e8e95d75ca6a99776a e7d92cdc71feacf90708cb59182d0df1b911f8ae022d29e8e95d75ca6a99776a ``` Per user requests, we've over time eliminateed some of the "noisier" output that Docker has, and that's now led to some confusion when we show an intermediate image id (after the commit) and then as in the case, the same final image id immediately afterwards. We display only the full final image id to make scripting easier per other user requests. To aid with this, this pr will cause the intermediate image to be displayed after an `-->` like Docker and will also show the 12 character short id. If the `--quiet` option is used, this shorter id will not be displayed, only the final longer one. New behavior: ``` STEP 1: FROM alpine AS tommer STEP 2: COMMIT tom --> e7d92cdc71f e7d92cdc71feacf90708cb59182d0df1b911f8ae022d29e8e95d75ca6a99776a ``` Fixes: containers/podman#5012 Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
f277e48 to
bb03eb3
Compare
|
bors r+ |
|
👎 Rejected by too few approved reviews |
|
bors retry |
2124: Make the commit id clear like Docker r=rhatdan a=TomSweeneyRedHat Using this Dockerfile: ``` FROM alpine AS tommer ``` Docker does: ``` Sending build context to Docker daemon 17.92kB Step 1/1 : FROM alpine AS tommer latest: Pulling from library/alpine c9b1b535fdd9: Pull complete Digest: sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d Status: Downloaded newer image for alpine:latest ---> e7d92cdc71fe Successfully built e7d92cdc71fe ``` While Buildah does: ``` STEP 1: FROM alpine AS tommer STEP 2: COMMIT tom e7d92cdc71feacf90708cb59182d0df1b911f8ae022d29e8e95d75ca6a99776a e7d92cdc71feacf90708cb59182d0df1b911f8ae022d29e8e95d75ca6a99776a ``` Per user requests, we've over time eliminated some of the "noisier" output that Docker has, and that's now led to some confusion when we show an intermediate image id (after the commit) and then as in the case, the same final image id immediately afterwards. We display only the full final image id to make scripting easier per other user requests. To aid with this, this pr will cause the intermediate image to be displayed after an `-->` like Docker and will also show the 12 character short id. If the `--quiet` option is used, this shorter id will not be displayed, only the final longer one. New behavior: ``` STEP 1: FROM alpine AS tommer STEP 2: COMMIT tom --> e7d92cdc71f e7d92cdc71feacf90708cb59182d0df1b911f8ae022d29e8e95d75ca6a99776a ``` Fixes: containers/podman#5012 Co-authored-by: TomSweeneyRedHat <tsweeney@redhat.com>
Build succeeded
|
Using this Dockerfile:
Docker does:
While Buildah does:
Per user requests, we've over time eliminated some of the "noisier" output that
Docker has, and that's now led to some confusion when we show an intermediate
image id (after the commit) and then as in the case, the same final
image id immediately afterwards. We display only the full final image id to
make scripting easier per other user requests.
To aid with this, this pr will cause the intermediate image to be displayed
after an
-->like Docker and will also show the 12 character short id.If the
--quietoption is used, this shorter id will not be displayed, onlythe final longer one.
New behavior:
Fixes: containers/podman#5012