Giter VIP home page Giter VIP logo

Comments (2)

apocas avatar apocas commented on June 23, 2024

Could you give more details?
Can't replicate this.

from docker-modem.

coco-super avatar coco-super commented on June 23, 2024

@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)

from docker-modem.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.