Open KBPratap opened 6 years ago
Could you give more details? Can't replicate this.
@nuxlli @rmg @knownasilya @Stuk @ekristen I have this issue, on some user machines this works fine but for some it throws the following errors. I don't know where the problem is,Can you give me some advice
dockerode version 3.0.2
docker.modem.followProgress(stream, onFinished, onProgress);
function buildImage(dockerBuildDir, dockerfilePath, imageTag) {
return new Promise((resolve, reject) => {
var tarStream = tar.pack(dockerBuildDir);
docker.buildImage(tarStream, {
dockerfile: path.relative(dockerBuildDir, dockerfilePath),
t: imageTag
}, (error, stream) => {
containers.add(stream);
if (error) { reject(error); }
else {
stream.on('error', (e) => {
containers.delete(stream);
reject(e);
});
stream.on('end', function () {
containers.delete(stream);
resolve(imageTag);
});
}
followProgress(stream, (err, res) => err ? reject(err) : resolve(res));
});
});
}
stream.pipe(parser);
^
TypeError: Cannot read property 'pipe' of null
at Modem.followProgress (/Users/ellison/fun/node_modules/docker-modem/lib/modem.js:379:10)
at followProgress (/Users/ellison/fun/lib/docker.js:295:16)
at docker.buildImage (/Users/ellison/fun/lib/docker.js:999:7)
at /Users/ellison/fun/node_modules/dockerode/lib/docker.js:295:9
at /Users/ellison/fun/node_modules/docker-modem/lib/modem.js:302:7
at IncomingMessage.<anonymous> (/Users/ellison/fun/node_modules/docker-modem/lib/modem.js:321:9)
at IncomingMessage.emit (events.js:187:15)
at IncomingMessage.EventEmitter.emit (domain.js:442:20)
at endReadableNT (_stream_readable.js:1092:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
I know this is very old, but I had the same issue and it turned out the /var/run/docker.sock
did not exist. Once that was corrected, everything worked fine.
I have this issue, on some user machines this works fine but for some it throws the following errors:
Following is the implementation
Docker Version 18.03.1-ce-mac65 (24312)