kitchen-docker_cli 0.1.1.alpha → 0.2.0.beta
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +13 -1
- data/lib/kitchen/driver/docker_cli.rb +2 -0
- data/lib/kitchen/driver/docker_cli_version.rb +1 -1
- data/spec/kitchen/driver/docker_cli_spec.rb +4 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b017b8199ef3de53c08c5272118323eec27674a8
|
4
|
+
data.tar.gz: c95e1536805f6f66fc46508aa85a20a69e977d11
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 099f68c752434b508d8a6023082f6d8043a5e571f605d0fe0eb6db9a0d8a85c9ff45d1af40d31b98ddcfb8c501574de397361587e28a82b40db7a7a980b4a61b
|
7
|
+
data.tar.gz: bda1883c6a1eb0e7e40424692ebff729b79842511c7ce7fa797904fd1dec36e647d5fdd14b232540932a1ce8b0a665af54b5b07fffb317e64eab1042e353cdfb
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -112,7 +112,7 @@ Examples:
|
|
112
112
|
|
113
113
|
Not use the cached image on ```docker build```.
|
114
114
|
|
115
|
-
The default value is ```
|
115
|
+
The default value is ```false```.
|
116
116
|
|
117
117
|
Examples:
|
118
118
|
|
@@ -120,6 +120,18 @@ Examples:
|
|
120
120
|
no_cache: true
|
121
121
|
```
|
122
122
|
|
123
|
+
### privileged
|
124
|
+
|
125
|
+
Give extended privileges to the suite container.
|
126
|
+
|
127
|
+
The default value is ```false```.
|
128
|
+
|
129
|
+
Examples:
|
130
|
+
|
131
|
+
```yml
|
132
|
+
privileged: true
|
133
|
+
```
|
134
|
+
|
123
135
|
### container_name
|
124
136
|
|
125
137
|
Set the name of container to link other container(s).
|
@@ -29,6 +29,7 @@ module Kitchen
|
|
29
29
|
|
30
30
|
default_config :no_cache, false
|
31
31
|
default_config :command, 'sh -c \'while true; do sleep 1d; done;\''
|
32
|
+
default_config :privileged, false
|
32
33
|
|
33
34
|
default_config :image do |driver|
|
34
35
|
driver.default_image
|
@@ -122,6 +123,7 @@ module Kitchen
|
|
122
123
|
cmd = "run -d -v #{Dir::tmpdir}:/tmp:rw"
|
123
124
|
cmd << " --name #{config[:container_name]}" if config[:container_name]
|
124
125
|
cmd << ' -P' if config[:publish_all]
|
126
|
+
cmd << ' --privileged' if config[:privileged]
|
125
127
|
Array(config[:publish]).each { |pub| cmd << " -p #{pub}" }
|
126
128
|
Array(config[:volume]).each { |vol| cmd << " -v #{vol}" }
|
127
129
|
Array(config[:link]).each { |link| cmd << " --link #{link}" }
|
@@ -196,7 +196,7 @@ describe Kitchen::Driver::DockerCli, "docker_build_command" do
|
|
196
196
|
end
|
197
197
|
|
198
198
|
context 'default' do
|
199
|
-
let(:config) {
|
199
|
+
let(:config) { {:no_cache => true} }
|
200
200
|
|
201
201
|
example do
|
202
202
|
expect(@docker_cli.docker_build_command).to eq 'build --no-cache -'
|
@@ -204,7 +204,7 @@ describe Kitchen::Driver::DockerCli, "docker_build_command" do
|
|
204
204
|
end
|
205
205
|
|
206
206
|
context 'nocache' do
|
207
|
-
let(:config) {
|
207
|
+
let(:config) { Hash.new }
|
208
208
|
|
209
209
|
example do
|
210
210
|
expect(@docker_cli.docker_build_command).to eq 'build -'
|
@@ -233,6 +233,7 @@ describe Kitchen::Driver::DockerCli, "docker_run_command" do
|
|
233
233
|
:command => '/bin/bash',
|
234
234
|
:container_name => 'web',
|
235
235
|
:publish_all => true,
|
236
|
+
:privileged => true,
|
236
237
|
:publish => ['80:8080', '22:2222'],
|
237
238
|
:volume => '/dev:/dev',
|
238
239
|
:link => 'mysql:db'
|
@@ -240,7 +241,7 @@ describe Kitchen::Driver::DockerCli, "docker_run_command" do
|
|
240
241
|
end
|
241
242
|
|
242
243
|
example do
|
243
|
-
cmd = "run -d -v #{Dir::tmpdir}:/tmp:rw --name web -P -p 80:8080 -p 22:2222 -v /dev:/dev --link mysql:db test /bin/bash"
|
244
|
+
cmd = "run -d -v #{Dir::tmpdir}:/tmp:rw --name web -P --privileged -p 80:8080 -p 22:2222 -v /dev:/dev --link mysql:db test /bin/bash"
|
244
245
|
expect(@docker_cli.docker_run_command('test')).to eq cmd
|
245
246
|
end
|
246
247
|
end
|