From a410696438ae168d3239776ef3f222f23b47d9ef Mon Sep 17 00:00:00 2001 From: Jan Renz Date: Tue, 14 Apr 2015 16:53:56 +0200 Subject: [PATCH] debugging --- lib/docker_client.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/docker_client.rb b/lib/docker_client.rb index 1c02f379..c617bca7 100644 --- a/lib/docker_client.rb +++ b/lib/docker_client.rb @@ -162,9 +162,12 @@ class DockerClient stdout = [] # map command in a shell call, maybe add -c command = ['bash', '-c', command] + command.join(' ') # lets call the command, but we do not want the container to stop afterwards # thats why we use exec. If its ok do stop the container this could be assign instead - container.exec(command) do |stream, chunk| + #container.exec(command) do |stream, chunk| + container.attach(stdin: StringIO.new(command)) do |stream, chunk| +end block.call(stream, chunk) if block_given? if stream == :stderr stderr.push(chunk)