mirror of
https://github.com/docker/cli.git
synced 2026-09-25 17:02:07 -04:00
Check bad syntax on dockerfile before building.
This fix tries to address the issue raised in 26453 where bad syntax
on dockerfile is not checked before building, thus user has to wait
before seeing error in dockerfile.
This fix fixes the issue by evaluating all the instructions and check
syntax before dockerfile is invoked actually.
All existing tests pass.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 824707ea49
Component: cli
This commit is contained in:
@@ -293,6 +293,9 @@ func runBuild(dockerCli *command.DockerCli, options buildOptions) error {
|
||||
|
||||
response, err := dockerCli.Client().ImageBuild(ctx, body, buildOptions)
|
||||
if err != nil {
|
||||
if options.quiet {
|
||||
fmt.Fprintf(dockerCli.Err(), "%s", progBuff)
|
||||
}
|
||||
return err
|
||||
}
|
||||
defer response.Body.Close()
|
||||
|
||||
Reference in New Issue
Block a user