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 <vincent@sbr.pm>
This commit is contained in:
Vincent Demeester 2018-06-01 18:34:00 +02:00
parent 31d99ba630
commit 8b3dc39fce
No known key found for this signature in database
GPG Key ID: 083CC6FD6EB699A3
1 changed files with 4 additions and 0 deletions

View File

@ -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")