dockly 1.5.14 → 1.5.15

Sign up to get free protection for your applications and to get access to all the features.
data/dockly.gemspec CHANGED
@@ -15,7 +15,7 @@ Gem::Specification.new do |gem|
15
15
  gem.require_paths = %w{lib}
16
16
  gem.version = Dockly::VERSION
17
17
  gem.add_dependency 'clamp', '~> 0.6'
18
- gem.add_dependency 'docker-api', '>= 1.13.1'
18
+ gem.add_dependency 'docker-api', '>= 1.14.0'
19
19
  gem.add_dependency 'dockly-util', '~> 0.0.9'
20
20
  gem.add_dependency 'excon'
21
21
  gem.add_dependency 'fog', '~> 1.21.0'
@@ -1,6 +1,10 @@
1
1
  class Dockly::BuildCache::Docker < Dockly::BuildCache::Base
2
2
  attr_accessor :image
3
3
 
4
+ def wait_time
5
+ 300 # max 5 minutes
6
+ end
7
+
4
8
  def execute!
5
9
  ensure_present! :image
6
10
  super
@@ -30,7 +34,7 @@ class Dockly::BuildCache::Docker < Dockly::BuildCache::Base
30
34
  tar_flags = keep_old_files ? '-xkf' : 'xf'
31
35
  container = ::Docker::Container.create(
32
36
  'Image' => image.id,
33
- 'Cmd' => ['/bin/bash', '-lc', [
37
+ 'Cmd' => ['/bin/bash', '-c', [
34
38
  "mkdir -p #{File.dirname(output_directory)}",
35
39
  '&&',
36
40
  "tar #{tar_flags} #{File.join('/', 'host', path)} -C #{File.dirname(output_directory)}"
@@ -85,11 +89,11 @@ class Dockly::BuildCache::Docker < Dockly::BuildCache::Base
85
89
  end
86
90
 
87
91
  def run_command(command)
88
- resp = ""
89
92
  debug "running command `#{command}` on image #{image.id}"
90
- container = image.run(["/bin/bash", "-lc", "cd #{command_directory} && #{command}"])
91
- container.attach(logs: true) { |source,chunk| resp += chunk }
92
- status = container.wait['StatusCode']
93
+ container = image.run(["/bin/bash", "-c", "cd #{command_directory} && #{command}"])
94
+ debug "command running in container #{container.id}"
95
+ status = container.wait(wait_time)['StatusCode']
96
+ resp = container.streaming_logs(stdout: true, stderr: true)
93
97
  debug "`#{command}` returned the following output:"
94
98
  debug resp.strip
95
99
  debug "`#{command}` exited with status #{status}, resulting container id: #{container.id}"
@@ -1,3 +1,3 @@
1
1
  module Dockly
2
- VERSION = '1.5.14'
2
+ VERSION = '1.5.15'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dockly
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.14
4
+ version: 1.5.15
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-09-17 00:00:00.000000000 Z
12
+ date: 2014-11-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: clamp
@@ -34,7 +34,7 @@ dependencies:
34
34
  requirements:
35
35
  - - ! '>='
36
36
  - !ruby/object:Gem::Version
37
- version: 1.13.1
37
+ version: 1.14.0
38
38
  type: :runtime
39
39
  prerelease: false
40
40
  version_requirements: !ruby/object:Gem::Requirement
@@ -42,7 +42,7 @@ dependencies:
42
42
  requirements:
43
43
  - - ! '>='
44
44
  - !ruby/object:Gem::Version
45
- version: 1.13.1
45
+ version: 1.14.0
46
46
  - !ruby/object:Gem::Dependency
47
47
  name: dockly-util
48
48
  requirement: !ruby/object:Gem::Requirement