debugging

This commit is contained in:
Jan Renz
2015-04-14 16:53:56 +02:00
parent 168df58cc7
commit a410696438

View File

@ -162,9 +162,12 @@ class DockerClient
stdout = [] stdout = []
# map command in a shell call, maybe add -c # map command in a shell call, maybe add -c
command = ['bash', '-c', command] command = ['bash', '-c', command]
command.join(' ')
# lets call the command, but we do not want the container to stop afterwards # 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 # 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? block.call(stream, chunk) if block_given?
if stream == :stderr if stream == :stderr
stderr.push(chunk) stderr.push(chunk)