beaker-docker 0.8.1 → 0.8.2

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
  SHA256:
3
- metadata.gz: d1f70940dc7c4b43db06838e143fc4e4a498247be0ed67ae0926ae84527f5786
4
- data.tar.gz: b12830fb23b10ccf1718be061c3e6ffe3e81c0b47b3aff58e3882e2e0a843c7d
3
+ metadata.gz: 02eaf00011bdb77e04d6c2ba218c0d6cb2f0337f03ea9e8770bbc132e8532d78
4
+ data.tar.gz: 1df91fb159aca545ae67ece3c5b4dfc326a81ef5ee8ce307acf21ab16fa4459f
5
5
  SHA512:
6
- metadata.gz: d182e05ba8dea02f896571bb5cf100f3a313349e1178f3eb9daf5e62f7ec93572114e4e1cf6e10a34aa18e8280d7be0ff7ed8a1482984cbd07ae3a530a7a0be9
7
- data.tar.gz: 478ac68e7088d66a8f5a4732f59a1337b355293b5a5f8d38551e5d54b81e6e7634528139b4c5717462b3d0b4a8558de05afc83b2f2c51705f0e8d16b7fb885a8
6
+ metadata.gz: 312bf63f3ea66c8d75921c4314912b6451b2457e31452b5cf05b2edbd43c671cefc9c0157f89ea01fb1ed8bcd49769be5770c0c18c559f6ccc47df39620e7e60
7
+ data.tar.gz: e087e4e649f2e31db3425ffefa0c83532e89ae4b8c6d7fab090989a511ced8b3f71133d9e211ae15358312ff0106c82ebd050245feb3e9743fe6caa60aafda02
@@ -1,3 +1,3 @@
1
1
  module BeakerDocker
2
- VERSION = '0.8.1'
2
+ VERSION = '0.8.2'
3
3
  end
@@ -192,6 +192,8 @@ module Beaker
192
192
  image_name = image.id
193
193
  end
194
194
 
195
+ ### BEGIN CONTAINER OPTIONS MANGLING ###
196
+
195
197
  container_opts = get_container_opts(host, image_name)
196
198
  if host['dockeropts'] || @options[:dockeropts]
197
199
  dockeropts = host['dockeropts'] ? host['dockeropts'] : @options[:dockeropts]
@@ -228,8 +230,17 @@ module Beaker
228
230
  container_opts['Env'] = host['docker_env']
229
231
  end
230
232
 
233
+ # Fixup privileges
234
+ #
235
+ # If the user has specified CAPs, then we cannot be privileged
236
+ #
237
+ # If the user has not specified CAPs, we will default to privileged for
238
+ # compatibility with worst practice
231
239
  if host['docker_cap_add']
232
240
  container_opts['HostConfig']['CapAdd'] = host['docker_cap_add']
241
+ container_opts['HostConfig'].delete('Privileged')
242
+ else
243
+ container_opts['HostConfig']['Privileged'] = container_opts['HostConfig']['Privileged'].nil? ? true : container_opts['HostConfig']['Privileged']
233
244
  end
234
245
 
235
246
  if host['docker_container_name']
@@ -238,6 +249,8 @@ module Beaker
238
249
  container_opts['name'] = ['beaker', host.name, SecureRandom.uuid.split('-').last].join('-')
239
250
  end
240
251
 
252
+ ### END CONTAINER OPTIONS MANGLING ###
253
+
241
254
  @logger.debug("Creating container from image #{image_name}")
242
255
 
243
256
  ok=false
@@ -303,6 +303,7 @@ module Beaker
303
303
  'PortBindings' => {
304
304
  '22/tcp' => [{ 'HostPort' => /\b\d{4}\b/, 'HostIp' => '0.0.0.0'}]
305
305
  },
306
+ 'Privileged' => true,
306
307
  'PublishAllPorts' => true,
307
308
  'RestartPolicy' => {
308
309
  'Name' => 'always'
@@ -337,6 +338,7 @@ module Beaker
337
338
  '22/tcp' => [{ 'HostPort' => /\b\d{4}\b/, 'HostIp' => '0.0.0.0'}]
338
339
  },
339
340
  'PublishAllPorts' => true,
341
+ 'Privileged' => true,
340
342
  'RestartPolicy' => {
341
343
  'Name' => 'always'
342
344
  }
@@ -367,6 +369,7 @@ module Beaker
367
369
  '22/tcp' => [{ 'HostPort' => /\b\d{4}\b/, 'HostIp' => '0.0.0.0'}]
368
370
  },
369
371
  'PublishAllPorts' => true,
372
+ 'Privileged' => true,
370
373
  'RestartPolicy' => {
371
374
  'Name' => 'always'
372
375
  }
@@ -424,6 +427,7 @@ module Beaker
424
427
  '22/tcp' => [{ 'HostPort' => /\b\d{4}\b/, 'HostIp' => '0.0.0.0'}]
425
428
  },
426
429
  'PublishAllPorts' => true,
430
+ 'Privileged' => true,
427
431
  'RestartPolicy' => {
428
432
  'Name' => 'always'
429
433
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beaker-docker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rishi Javia, Kevin Imber, Tony Vu