diff --git a/lib/docker.js b/lib/docker.js index 498da13..aceccd9 100644 --- a/lib/docker.js +++ b/lib/docker.js @@ -296,7 +296,7 @@ Docker.prototype.buildImage = function(file, opts, callback) { } } - if (file.context) { + if (file && file.context) { file.src.forEach(function(filePath) { content = fs.readFileSync(path.join(file.context, filePath)); pack.entry({