From 8b3dc39fce3a7b92baab4f3b61c8c53bc7a06263 Mon Sep 17 00:00:00 2001 From: Vincent Demeester Date: Fri, 1 Jun 2018 18:34:00 +0200 Subject: [PATCH] Fix panics when --compress and --stream are used together Warns that `-compress` has no effect when used together with the expremintal `--stream` flag. Signed-off-by: Vincent Demeester --- cli/command/image/build.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cli/command/image/build.go b/cli/command/image/build.go index 33493f697c..4a9be0dc82 100644 --- a/cli/command/image/build.go +++ b/cli/command/image/build.go @@ -182,6 +182,10 @@ func runBuild(dockerCli command.Cli, options buildOptions) error { remote string ) + if options.compress && options.stream { + return errors.New("--compress conflicts with --stream options") + } + if options.dockerfileFromStdin() { if options.contextFromStdin() { return errors.New("invalid argument: can't use stdin for both build context and dockerfile")