kitchen-docker 1.3.1 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bd9262b64fc818c54e30e2421c81b662a1189e45
4
- data.tar.gz: 7a59d117ce6c46cfacc5ddfe0cdda070e8eac679
3
+ metadata.gz: febbd5bd9280ef03712f80892cb79077b144b495
4
+ data.tar.gz: 01d4a5cbe7630cffb5bd15b3a8e37ccec6aa650e
5
5
  SHA512:
6
- metadata.gz: b36a3b35e69914ac13dab5aa52d3de9bc213e4a5b56482dd01672bcb91f14cc6dbdb85af455aa525ea06cfac2a78726ef27460a8657fdd837a1270245be1e2a7
7
- data.tar.gz: 90516dd7f44e0e1341a27b378152dd17e5842b137fd69013820a85d3313b5769413705412cc72678412d60a991db50bf52e0ab5182661ae57268c97af64fee73
6
+ metadata.gz: 5c4927c29863e4d807e7d8d4d8428aef455466713f1d6c1d16d3c94a9fd258e1c0b301227e2d7b96a7225c4670d690b91efa4987ae9fb3f4b3e70606b9c3921c
7
+ data.tar.gz: 094f03312bba898e5ad6733f2f1e041c883eb64eb299f6e93d59976d6171e5874ccc035489ee05d6a19a1f50cb86ffe9f6f8e689e8ea078d6fa19033ac13b905
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  Author:: Sean Porter (<portertech@gmail.com>)
2
2
 
3
- Copyright (C) 2013, Sean Porter
3
+ Copyright (C) 2014, Sean Porter
4
4
 
5
5
  Licensed under the Apache License, Version 2.0 (the "License");
6
6
  you may not use this file except in compliance with the License.
data/README.md CHANGED
@@ -226,7 +226,24 @@ Examples:
226
226
  - 8.8.8.8
227
227
  - 8.8.4.4
228
228
  ```
229
+ ### http\_proxy
229
230
 
231
+ Sets an http proxy for the suite container using the `http_proxy` environment variable.
232
+
233
+ Examples:
234
+
235
+ ```
236
+ http_proxy: http://proxy.host.com:8080
237
+ ```
238
+ ### https\_proxy
239
+
240
+ Sets an https proxy for the suite container using the `https_proxy` environment variable.
241
+
242
+ Examples:
243
+
244
+ ```
245
+ https_proxy: http://proxy.host.com:8080
246
+ ```
230
247
  ### forward
231
248
 
232
249
  Set suite container port(s) to forward to the host machine. You may specify
@@ -1,6 +1,6 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  #
3
- # Copyright (C) 2013, Sean Porter
3
+ # Copyright (C) 2014, Sean Porter
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -33,7 +33,7 @@ module Kitchen
33
33
  default_config :privileged, false
34
34
  default_config :use_cache, true
35
35
  default_config :remove_images, false
36
- default_config :run_command, '/usr/sbin/sshd -D -o UseDNS=no -o UsePAM=no'
36
+ default_config :run_command, '/usr/sbin/sshd -D -o UseDNS=no -o UsePAM=no -o UsePrivilegeSeparation=no -o PidFile=/tmp/sshd.pid'
37
37
  default_config :username, 'kitchen'
38
38
  default_config :password, 'kitchen'
39
39
  default_config :tls, false
@@ -143,7 +143,6 @@ module Kitchen
143
143
  username = config[:username]
144
144
  password = config[:password]
145
145
  base = <<-eos
146
- RUN mkdir -p /var/run/sshd
147
146
  RUN useradd -d /home/#{username} -m -s /bin/bash #{username}
148
147
  RUN echo #{username}:#{password} | chpasswd
149
148
  RUN echo '#{username} ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
@@ -196,10 +195,13 @@ module Kitchen
196
195
  Array(config[:forward]).each {|port| cmd << " -p #{port}"}
197
196
  Array(config[:dns]).each {|dns| cmd << " -dns #{dns}"}
198
197
  Array(config[:volume]).each {|volume| cmd << " -v #{volume}"}
198
+ Array(config[:volumes_from]).each {|container| cmd << " --volumes-from #{container}"}
199
199
  cmd << " -h #{config[:hostname]}" if config[:hostname]
200
200
  cmd << " -m #{config[:memory]}" if config[:memory]
201
201
  cmd << " -c #{config[:cpu]}" if config[:cpu]
202
202
  cmd << " -privileged" if config[:privileged]
203
+ cmd << " -e http_proxy=#{config[:http_proxy]}" if config[:http_proxy]
204
+ cmd << " -e https_proxy=#{config[:https_proxy]}" if config[:https_proxy]
203
205
  cmd << " #{image_id} #{config[:run_command]}"
204
206
  cmd
205
207
  end
@@ -222,7 +224,7 @@ module Kitchen
222
224
  def parse_container_ssh_port(output)
223
225
  begin
224
226
  info = Array(::JSON.parse(output)).first
225
- ports = info['NetworkSettings']['Ports']
227
+ ports = info['NetworkSettings']['Ports'] || info['HostConfig']['PortBindings']
226
228
  ssh_port = ports['22/tcp'].detect {|port| port['HostIp'] == '0.0.0.0'}
227
229
  ssh_port['HostPort'].to_i
228
230
  rescue
@@ -1,6 +1,6 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  #
3
- # Copyright (C) 2013, Sean Porter
3
+ # Copyright (C) 2014, Sean Porter
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -1,6 +1,6 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  #
3
- # Copyright (C) 2013, Sean Porter
3
+ # Copyright (C) 2014, Sean Porter
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -19,6 +19,6 @@ module Kitchen
19
19
  module Driver
20
20
 
21
21
  # Version string for Docker Kitchen driver
22
- DOCKER_VERSION = "1.3.1"
22
+ DOCKER_VERSION = "1.4.0"
23
23
  end
24
24
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kitchen-docker
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Porter
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-05 00:00:00.000000000 Z
11
+ date: 2014-06-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-kitchen