Conversation
Currently there is no way to completely suppress the progress output. We have --progress=quiet but it has additional effect of printing image ID as a progress for historical reasons. --progress=none behaves like quiet but without this extra output printing depending on build output. Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
12d4d53 to
9c7b962
Compare
| func commonBuildFlags(options *commonFlags, flags *pflag.FlagSet) { | ||
| options.noCache = flags.Bool("no-cache", false, "Do not use cache when building the image") | ||
| flags.StringVar(&options.progress, "progress", "auto", `Set type of progress output ("auto", "quiet", "plain", "tty", "rawjson"). Use plain to show container output`) | ||
| flags.StringVar(&options.progress, "progress", "auto", `Set type of progress output ("auto", "none", "plain", "quiet", "rawjson", "tty"). Use plain to show container output`) |
There was a problem hiding this comment.
I think it might be more straightforward to modify the --quiet flag.
If you change quiet to be an integer, you can use pflag.CountVarP so -qq will be "very" quiet. Then we can also add --progress=none and have it set o.quiet = 2. If o.quiet <= 1 then we'll print the image id.
I think that will keep backwards compatibility and will be an easier command line experience.
There was a problem hiding this comment.
I don't get it. --quiet is a boolean atm. Afaics you can't change its type in a backwards-compatible way.
This isn't about extending the capabilites of --quiet. For me it is flag that you should never use and only provided for historic reasons. Ideally we should have left the printing on image ID only to --quiet and make --progress=quiet actually return empty progress but can't change that anymore.
related #3424
Currently there is no way to completely suppress the progress output. We have --progress=quiet but it has additional effect of printing image ID as a progress for historical reasons. --progress=none behaves like quiet but without this extra output printing depending on build output.
It might be worth adding this to buildkit as well to clean it up a bit. I didn't do it because in buildkit
quietdoes work correctly and this image ID printing is something specific to buildx.In other commands except
buildthere is no functional change but added option in there as well for consistency.