You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you can reproduce with the Docker CLI, please explain how (since we don't all have a Ruby environment here, and it will be much easier to fix the problem if it can be reproduced with standard tools).
If you cannot reproduce with the Docker CLI, it is probably an issue with the Ruby gem.
I was unable to find the CLI that will accomplish the above step ( insert_local), could you please show mw an example how it can be represented using the CLI ?
I'm using Ruby gem 'docker-api' with a Docker daemon running on a remote server.
I ran into timeout issue when I want to get output from running a command inside the container.
create an image
image = Docker::Image.create('fromImage'=>'base')
insert a local file into the image
image.insert_local('localPath'=>['/root/docker_scripts/install_prereqs.sh', '/root/docker_scripts/weaver_script.sh'], 'outputPath'=>'/tmp/')
get the image id from the response
image_data = eval("image.json")
puts image.json
image_id = image_data["id"]
inputs = Hash.new
inputs["Image"] = image_id
inputs["Cmd"] = ['ls -al']
create a container with the image id and the command 'ls -al'
myContainer = Docker::Container.create(inputs)
start the container and stream the output
myContainer.tap(&:start).attach {|stream,chunk| puts "#{stream}: #{chunk}"}
RESPONSE:
read time out reached
.docker_9f738e00-3424-0131-e558-525400c6ff8e [Status: failed]
The text was updated successfully, but these errors were encountered: