Comments (10)
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.
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.
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.
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.
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.
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.
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.
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.
Fixed in #38
from dockerode.
Awesome!
from dockerode.
Related Issues (20)
- Pushing an image to private registry with auth not working HOT 1
- Error while installing with pnpm
- ContainerStartOptions does not contain abortSignal property HOT 1
- Missing Changelog HOT 5
- Specifying socketPath but Dockerode is using HTTP. (bun.js) HOT 13
- Image name when we use buildImage doesn't work HOT 1
- Changelog HOT 4
- Undocumented breaking change: container.logs now produces a string HOT 8
- Error building image
- Error to get logs on some containers HOT 1
- Passing filter options to pruneImages HOT 1
- Module parse failed: Unexpected character '�' (1:0) HOT 1
- Restore exec stream
- Source directory and Dockerfile in different locations HOT 2
- Clone a container HOT 1
- unable to handle ssh network errors HOT 2
- Sending User Input via Attach or Other
- Missing type `CreatedAt` from `listVolumes()`
- Missing option type `force: boolean` from `volume.remove()` HOT 1
- TypeError: this.modem.Promise is not a constructor HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dockerode.