kitchen-docker_cli 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +20 -3
- 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 -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: 542121f429ecd37ef1d476965ab303b0328d29ab
|
4
|
+
data.tar.gz: b01101c45a35091e275e93bde71c04dd101984f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a124b04c5e9474e78c744948542653e867fbb9f49622e666d8fa47cf3636408f6e5334dc58d058b9050b0cc66e71b2bee0f839071f6f456e73238f1679f17c9c
|
7
|
+
data.tar.gz: 1ae8f6d48a4c270e1a1ebc25ee674266b15496a724e179ad9472b34a5552854dc8d5be66721a9ed7dd210ba7e26f1c6d849d0f81e14cd12169d5277266c85b5e
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -183,16 +183,33 @@ Examples:
|
|
183
183
|
|
184
184
|
### dockerfile
|
185
185
|
|
186
|
-
Create test image using a supplied dockerfile, instead of the default dockerfile created.
|
187
|
-
For best results, please:
|
186
|
+
Create test image using a supplied dockerfile, instead of the default dockerfile created.
|
187
|
+
For best results, please:
|
188
188
|
- Ensure Package Repositories are updated
|
189
|
-
- Ensure Dockerfile installs sudo, curl and tar
|
189
|
+
- Ensure Dockerfile installs sudo, curl, and tar
|
190
190
|
- If Ubuntu/Debian, Set DEBIAN_FRONTEND to noninteractive
|
191
191
|
|
192
192
|
```yml
|
193
193
|
dockerfile: my/dockerfile
|
194
194
|
```
|
195
195
|
|
196
|
+
### memory_limit
|
197
|
+
|
198
|
+
Constrain the memory available.
|
199
|
+
|
200
|
+
```yml
|
201
|
+
memory_limit: 256m
|
202
|
+
```
|
203
|
+
|
204
|
+
### cpu_shares
|
205
|
+
|
206
|
+
Change the priority of CPU Time.
|
207
|
+
This option with value 0 indicates that the running container has access to all 1024 (default) CPU shares.
|
208
|
+
|
209
|
+
```yml
|
210
|
+
cpu_shares: 512
|
211
|
+
```
|
212
|
+
|
196
213
|
## <a name="development"></a> Development
|
197
214
|
|
198
215
|
* Source hosted at [GitHub][repo]
|
@@ -128,6 +128,8 @@ module Kitchen
|
|
128
128
|
cmd = "run -d"
|
129
129
|
cmd << " --name #{config[:container_name]}" if config[:container_name]
|
130
130
|
cmd << ' -P' if config[:publish_all]
|
131
|
+
cmd << " -m #{config[:memory_limit]}" if config[:memory_limit]
|
132
|
+
cmd << " -c #{config[:cpu_shares]}" if config[:cpu_shares]
|
131
133
|
cmd << ' --privileged' if config[:privileged]
|
132
134
|
Array(config[:publish]).each { |pub| cmd << " -p #{pub}" }
|
133
135
|
Array(config[:volume]).each { |vol| cmd << " -v #{vol}" }
|
@@ -238,12 +238,14 @@ describe Kitchen::Driver::DockerCli, "docker_run_command" do
|
|
238
238
|
:privileged => true,
|
239
239
|
:publish => ['80:8080', '22:2222'],
|
240
240
|
:volume => '/dev:/dev',
|
241
|
-
:link => 'mysql:db'
|
241
|
+
:link => 'mysql:db',
|
242
|
+
:memory_limit => '256m',
|
243
|
+
:cpu_shares => 512
|
242
244
|
}
|
243
245
|
end
|
244
246
|
|
245
247
|
example do
|
246
|
-
cmd = "run -d --name web -P --privileged -p 80:8080 -p 22:2222 -v /dev:/dev --link mysql:db test /bin/bash"
|
248
|
+
cmd = "run -d --name web -P -m 256m -c 512 --privileged -p 80:8080 -p 22:2222 -v /dev:/dev --link mysql:db test /bin/bash"
|
247
249
|
expect(@docker_cli.docker_run_command('test')).to eq cmd
|
248
250
|
end
|
249
251
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kitchen-docker_cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masashi Terui
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-02-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: test-kitchen
|