Created
May 19, 2016 01:36
-
-
Save hirokiky/88c4e423aaecfc6137ed0ccb75af3618 to your computer and use it in GitHub Desktop.
Writing files by dockerode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
container.exec({Cmd: ['/bin/sh', '-c', 'cat > /path/to/test.txt], AttachStdin: true}, (err, exec) => { | |
exec.start({hijack: true, stdin: true}, function(err, stream) { | |
stream.write("Hi there.\n") | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment