-
Notifications
You must be signed in to change notification settings - Fork 18.7k
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
Add hint of progress to the output of docker build
#24978
Conversation
This fix tries to address the issue raised in 24912 where docker build only consists of the current step without overall total steps. This fix adds the overall total steps so that end user could follow the progress of the docker build. An additonal test has been added to cover the changes. This fix fixes 24912. Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
c7e7e24
to
35418c1
Compare
This change breaks compatibility for those who greps the stream with a regexp like So I think "Step 1 : FOOBAR (1/5)" is better for compatibility. |
ping @duglin wdyt? |
At first I thought we'd have to turn the Dockerfile processing into a 2-pass parsing thing, so I'm glad that I forgot that we read it all into memory and can know the number of steps easily. I'll try to find some time over the next day or so to review it. But, overall, I don't have an issue with the idea of doing this, I just personally don't see much value in it, but if others do it might help to have them explain why this would help aside from "just to know". |
Yeah, it won't give any clue as to how long the remaining steps will take, so it's not adding a lot, other than you know how many steps it takes until completion |
Perhaps instead just print out the "Total Steps" right at the start? ie: $ docker build .
Sending build context to Docker daemon 8.192 kB
Total Steps: 9
Step 1 : FROM alpine:3.4
...
Step 9 : CMD sh
---> Running in 2c2a1c7f3aa1
---> fdbc4e5a9e55
Removing intermediate container 2c2a1c7f3aa1
Successfully built fdbc4e5a9e55 |
I have a slight preference for the |
I agree with @duglin |
moving this to code review |
LGTM |
1 similar comment
LGTM |
- What I did
This fix tries to address the issue raised in #24912 where docker build only consists of the current step without overall total steps.
- How I did it
This fix adds the overall total steps so that end user could follow
the progress of the docker build.
- How to verify it
An additonal test has been added to cover the changes.
- Description for the changelog
Add hint of progress (e.g.,
Step 1/5
) to the output ofdocker build
so that the total steps is known during the build progress.- A picture of a cute animal (not mandatory but encouraged)
This fix fixes #24912.
Signed-off-by: Yong Tang yong.tang.github@outlook.com