mirror of
https://github.com/kreuzwerker/terraform-provider-docker.git
synced 2025-12-20 22:59:42 -05:00
added error handling if context file not found
This commit is contained in:
parent
83a0e1d162
commit
cc80dff9e8
1 changed files with 3 additions and 0 deletions
|
|
@ -175,6 +175,9 @@ func buildDockerImage(client *client.Client, buildOptions map[string]interface{}
|
|||
buildContext = buildContext[:lastIndex]
|
||||
}
|
||||
dockerContextTarPath, err := buildDockerImageContextTar(buildContext)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Unable to build context %v", err)
|
||||
}
|
||||
defer os.Remove(dockerContextTarPath)
|
||||
dockerBuildContext, err := os.Open(dockerContextTarPath)
|
||||
defer dockerBuildContext.Close()
|
||||
|
|
|
|||
Loading…
Reference in a new issue