|
@@ -20,7 +20,6 @@
|
|
package builder
|
|
package builder
|
|
|
|
|
|
import (
|
|
import (
|
|
- "errors"
|
|
|
|
"fmt"
|
|
"fmt"
|
|
"io"
|
|
"io"
|
|
"os"
|
|
"os"
|
|
@@ -42,10 +41,6 @@ import (
|
|
"github.com/docker/docker/utils"
|
|
"github.com/docker/docker/utils"
|
|
)
|
|
)
|
|
|
|
|
|
-var (
|
|
|
|
- ErrDockerfileEmpty = errors.New("Dockerfile cannot be empty")
|
|
|
|
-)
|
|
|
|
-
|
|
|
|
// Environment variable interpolation will happen on these statements only.
|
|
// Environment variable interpolation will happen on these statements only.
|
|
var replaceEnvAllowed = map[string]struct{}{
|
|
var replaceEnvAllowed = map[string]struct{}{
|
|
command.Env: {},
|
|
command.Env: {},
|
|
@@ -225,7 +220,7 @@ func (b *Builder) readDockerfile() error {
|
|
return fmt.Errorf("Cannot locate specified Dockerfile: %s", origFile)
|
|
return fmt.Errorf("Cannot locate specified Dockerfile: %s", origFile)
|
|
}
|
|
}
|
|
if fi.Size() == 0 {
|
|
if fi.Size() == 0 {
|
|
- return ErrDockerfileEmpty
|
|
|
|
|
|
+ return fmt.Errorf("The Dockerfile (%s) cannot be empty", origFile)
|
|
}
|
|
}
|
|
|
|
|
|
f, err := os.Open(filename)
|
|
f, err := os.Open(filename)
|