Closed lmayorga1980 closed 4 years ago
@lmayorga1980 Can you try this branch? https://github.com/swipely/docker-api/tree/release-2.x
@tlunter , :+1:
docker-api-1.34.2 - This is actually the build from that branch but tried to keep compatible with the higher dependency of inspec
and train
.
Seems like it blows because the container is not running and that is a good sign because it is actually not running :smile:
With Stopped Container
Traceback (most recent call last):
35: from C:/tools/ruby25/bin/inspec:23:in `<main>'
34: from C:/tools/ruby25/bin/inspec:23:in `load'
33: from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/inspec-2.3.5/bin/inspec:12:in `<top (required)>'
32: from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor/base.rb:466:in `start'
31: from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
30: from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
29: from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
28: from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/inspec-2.3.5/lib/inspec/cli.rb:181:in `exec'
27: from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/inspec-2.3.5/lib/inspec/cli.rb:181:in `new'
26: from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/inspec-2.3.5/lib/inspec/runner.rb:58:in `initialize'
25: from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/inspec-2.3.5/lib/inspec/runner.rb:66:in `configure_transport'
24: from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/inspec-2.3.5/lib/inspec/backend.rb:51:in `create'
23: from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/train-1.5.0/lib/train/transports/docker.rb:22:in `connection'
22: from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/train-1.5.0/lib/train/transports/docker.rb:41:in `create_new_connection'
21: from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/train-1.5.0/lib/train/transports/docker.rb:41:in `new'
20: from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/train-1.5.0/lib/train/transports/docker.rb:64:in `initialize'
19: from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/train-1.5.0/lib/train/extras/command_wrapper.rb:128:in `load'
18: from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/train-1.5.0/lib/train/plugins/base_connection.rb:95:in `platform'
17: from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/train-1.5.0/lib/train/platforms/detect.rb:9:in `scan'
16: from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/train-1.5.0/lib/train/platforms/detect/scanner.rb:27:in `scan'
15: from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/train-1.5.0/lib/train/platforms/detect/scanner.rb:27:in `each'
14: from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/train-1.5.0/lib/train/platforms/detect/scanner.rb:33:in `block in scan'
13: from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/train-1.5.0/lib/train/platforms/detect/scanner.rb:45:in `scan_children'
12: from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/train-1.5.0/lib/train/platforms/detect/scanner.rb:45:in `each'
11: from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/train-1.5.0/lib/train/platforms/detect/scanner.rb:46:in `block in scan_children'
10: from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/train-1.5.0/lib/train/platforms/detect/scanner.rb:46:in `instance_eval'
9: from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/train-1.5.0/lib/train/platforms/detect/specifications/os.rb:35:in `block in load'
8: from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/train-1.5.0/lib/train/platforms/detect/helpers/os_common.rb:43:in `unix_uname_s'
7: from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/train-1.5.0/lib/train/platforms/detect/helpers/os_common.rb:36:in `command_output'
6: from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/train-1.5.0/lib/train/plugins/base_connection.rb:103:in `run_command'
5: from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/train-1.5.0/lib/train/transports/docker.rb:94:in `run_command_via_connection'
4: from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/docker-api-1.34.2/lib/docker/container.rb:76:in `exec'
3: from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/docker-api-1.34.2/lib/docker/exec.rb:22:in `create'
2: from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/docker-api-1.34.2/lib/docker/connection.rb:65:in `block (2 levels) in <class:Connection>'
1: from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/docker-api-1.34.2/lib/docker/connection.rb:37:in `request'
C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/docker-api-1.34.2/lib/docker/connection.rb:48:in `rescue in request': {"message":"Container f485568c6490711c046945534d1b74dd9810ff6d35b10584287ff28ebbeb27dd is not running"} (Docker::Error::ConflictError)
With Running Container
I had to set the DOCKER_URL
environment variable in order to pick the tcp
url.
[Environment]::SetEnvironmentVariable('DOCKER_URL','tcp://127.0.0.1:2375')
PS C:\chocopacks\chocobee\nodejs\6.10.2> inspec exec .\test.rb -t docker://b4f21b9cf2ce
Traceback (most recent call last):
19: from C:/tools/ruby25/bin/inspec:23:in `<main>'
18: from C:/tools/ruby25/bin/inspec:23:in `load'
17: from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/inspec-2.3.5/bin/inspec:12:in `<top (required)>'
16: from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor/base.rb:466:in `start'
15: from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
14: from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
13: from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
12: from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/inspec-2.3.5/lib/inspec/cli.rb:181:in `exec'
11: from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/inspec-2.3.5/lib/inspec/cli.rb:181:in `new'
10: from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/inspec-2.3.5/lib/inspec/runner.rb:58:in `initialize'
9: from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/inspec-2.3.5/lib/inspec/runner.rb:66:in `configure_transport'
8: from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/inspec-2.3.5/lib/inspec/backend.rb:51:in `create'
7: from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/train-1.5.0/lib/train/transports/docker.rb:22:in `connection'
6: from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/train-1.5.0/lib/train/transports/docker.rb:41:in `create_new_connection'
5: from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/train-1.5.0/lib/train/transports/docker.rb:41:in `new'
4: from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/train-1.5.0/lib/train/transports/docker.rb:64:in `initialize'
3: from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/train-1.5.0/lib/train/extras/command_wrapper.rb:128:in `load'
2: from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/train-1.5.0/lib/train/plugins/base_connection.rb:95:in `platform'
1: from C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/train-1.5.0/lib/train/platforms/detect.rb:9:in `scan'
C:/tools/ruby25/lib/ruby/gems/2.5.0/gems/train-1.5.0/lib/train/platforms/detect/scanner.rb:41:in `scan': Sorry, we are unable to detect your platform (Train::PlatformDetectionFailed)
@tlunter Is there anything the community of users can do to help that 2.x branch along? Here at Chef we rely pretty heavily on this library and I'm sure that some point Docker is going to remove support for the older API it relies on. If there's something we can do to help support newer docker releases do let us know.
@tlunter Any plans to get the v2branch released?Any blockers?
Where does this stand?
I've merged and pushed the v2 branch as v2.0.0.pre.1. Please let know if folks have any issue.
Seems like
docker-api
is a dependency ofinspec
and having the following issue with Windows 2016 Docker Host.