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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a4d1591386e1438dffedf92d0ee7acfe31c48a6c
4
- data.tar.gz: 1557e700e2a295f18aef33d82894ed8339b5cbc1
3
+ metadata.gz: b017b8199ef3de53c08c5272118323eec27674a8
4
+ data.tar.gz: c95e1536805f6f66fc46508aa85a20a69e977d11
5
5
  SHA512:
6
- metadata.gz: 5d0f8f91446db6873f9ff0eba03c63bc4ce3183d8a5dccb06cad964aee5f7d0c9b425598382bb5123e914e33c4080bc2ca7a001e8aa06381c4898f06923007f7
7
- data.tar.gz: e85823ec45f02e87c2b72c80e6d7faa4e462e9e017cb9af1e6c65abec5c5b1cafe2405659cbf04d07b50bb7a2fd8036c77a8f4043a5ef20d155a7e627f0d2d50
6
+ metadata.gz: 099f68c752434b508d8a6023082f6d8043a5e571f605d0fe0eb6db9a0d8a85c9ff45d1af40d31b98ddcfb8c501574de397361587e28a82b40db7a7a980b4a61b
7
+ data.tar.gz: bda1883c6a1eb0e7e40424692ebff729b79842511c7ce7fa797904fd1dec36e647d5fdd14b232540932a1ce8b0a665af54b5b07fffb317e64eab1042e353cdfb
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## 0.2.0.beta
2
+
3
+ * Add ```privileged``` option
4
+
5
+ ## 0.1.1.alpha
6
+
7
+ * Change ```no_cache``` option's default value to ```false```
8
+
1
9
  ## 0.1.0.alpha
2
10
 
3
11
  * Initial release
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 ```true```.
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}" }
@@ -21,6 +21,6 @@ module Kitchen
21
21
  module Driver
22
22
 
23
23
  # Version string for DockerCli Kitchen driver
24
- DOCKER_CLI_VERSION = '0.1.1.alpha'
24
+ DOCKER_CLI_VERSION = '0.2.0.beta'
25
25
  end
26
26
  end
@@ -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) { Hash.new }
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) { {:no_cache => false} }
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kitchen-docker_cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1.alpha
4
+ version: 0.2.0.beta
5
5
  platform: ruby
6
6
  authors:
7
7
  - Masashi Terui