kitchen-docker 1.3.1 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/LICENSE +1 -1
- data/README.md +17 -0
- data/lib/kitchen/driver/docker.rb +6 -4
- data/lib/kitchen/driver/docker/erb.rb +1 -1
- data/lib/kitchen/driver/docker_version.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: febbd5bd9280ef03712f80892cb79077b144b495
|
|
4
|
+
data.tar.gz: 01d4a5cbe7630cffb5bd15b3a8e37ccec6aa650e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5c4927c29863e4d807e7d8d4d8428aef455466713f1d6c1d16d3c94a9fd258e1c0b301227e2d7b96a7225c4670d690b91efa4987ae9fb3f4b3e70606b9c3921c
|
|
7
|
+
data.tar.gz: 094f03312bba898e5ad6733f2f1e041c883eb64eb299f6e93d59976d6171e5874ccc035489ee05d6a19a1f50cb86ffe9f6f8e689e8ea078d6fa19033ac13b905
|
data/LICENSE
CHANGED
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)
|
|
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)
|
|
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.
|
|
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.
|
|
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-
|
|
11
|
+
date: 2014-06-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: test-kitchen
|