Git Product home page Git Product logo

Comments (10)

apocas avatar apocas commented on August 27, 2024

Check the "duplex" branch :)
But it needs to be tested.

Basically it uses a duplex stream encapsulating req and res. It was hacked in 5 mins.
Right now it is failling the test suite on image building and creation.

I will probably look into it this weekend, since I also need it for other issue. #2

from dockerode.

jaredly avatar jaredly commented on August 27, 2024

cool. Right now I'm going with manual websockets. Unfortunately I can't get
websockets working w/ unix sockets :( but local tcp works great.

On Fri, Oct 18, 2013 at 2:02 PM, Pedro Dias [email protected]:

Check the "duplex" branch :)
But it needs to be tested.

Basically it uses a duplex stream encapsulating req and res. It was hacked
in 5 mins.
Right now it is failling the test suite on image building and creation.

I will probably look into this this weekend, since I also need it for
other issue. #2 #2


Reply to this email directly or view it on GitHubhttps://github.com//issues/5#issuecomment-26625481
.

from dockerode.

apocas avatar apocas commented on August 27, 2024

Yeah I've the same problem in here with ws and unixsocket.
I've open an issue websockets/ws#236 on their repo about this.

from dockerode.

jaredly avatar jaredly commented on August 27, 2024

unfortunately, I think there's a docker issue too:
http://stackoverflow.com/questions/19456237/docker-websocket-attach-using-unix-sockets

On Fri, Oct 18, 2013 at 2:13 PM, Pedro Dias [email protected]:

Yeah I've the same problem in here with ws and unixsocket.
I've open an issue websockets/ws#236https://github.com/einaros/ws/issues/236on their repo about this.


Reply to this email directly or view it on GitHubhttps://github.com//issues/5#issuecomment-26626215
.

from dockerode.

vincentwoo avatar vincentwoo commented on August 27, 2024

Would very much like to be able to do this as well. Could you also provide docks on consuming regular stdout streams? I'm having trouble passing in a duplex stream and getting output.

from dockerode.

apocas avatar apocas commented on August 27, 2024

stdin attach via remote api is still in a limbo right now, till I figure out how to do it.

Could you detail your second question?

You can easily attach and separate stderr and stdout, example:
container.attach({stream: true, stdout: true, stderr: true, tty: false}, function(err, stream) {
container.modem.demuxStream(stream, process.stdout, process.stderr);
});

from dockerode.

vincentwoo avatar vincentwoo commented on August 27, 2024

I figured out my issue - I'm a total stream novice, and didn't realize I needed to override stream._write to get any output.

from dockerode.

apocas avatar apocas commented on August 27, 2024

No problem :)
BTW, Passthrough stream from streams2 is cool for that, since you don't need to override a lot of stuff :)
http://nodejs.org/api/stream.html#stream_class_stream_passthrough

Regarding stdin attach a lot of people is having issues with it via plain remote api.
Via websockets theres the issue you read above.

So right now it's in limbo.

from dockerode.

apocas avatar apocas commented on August 27, 2024

Fixed in #38

from dockerode.

jaredly avatar jaredly commented on August 27, 2024

Awesome!

from dockerode.

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.