diff --git a/Client/cmd/docker.go b/Client/cmd/docker.go index 2d42460..cf82448 100644 --- a/Client/cmd/docker.go +++ b/Client/cmd/docker.go @@ -5,6 +5,7 @@ import ( "github.com/spf13/cobra" shared "github.com/CoreViewInc/CoreNiko/shared" "fmt" + "os" ) // DockerCLI provides methods which execute docker commands. @@ -46,7 +47,11 @@ var ( // Retrieve the dockerfile path from the --file flag, or use the default "Dockerfile" dockerfilePath, _ := cmd.Flags().GetString("file") // Call the build service with the options, context path, and dockerfile path - DockerCLI.Service.BuildImage(buildOptions, contextPath, dockerfilePath) + err := DockerCLI.Service.BuildImage(buildOptions, contextPath, dockerfilePath) + if err!=nil{ + fmt.Println(err) + os.Exit(1) + } }, }