kitchen-docker_cli 0.10.0 → 0.11.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/CHANGELOG.md +4 -0
- data/README.md +18 -0
- data/lib/kitchen/driver/docker_cli.rb +1 -0
- data/lib/kitchen/driver/docker_cli_version.rb +1 -1
- data/spec/kitchen/driver/docker_cli_spec.rb +2 -1
- 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: 359f46d9d1ce5cd75286176ccd7c95e6e3d1f90c
|
4
|
+
data.tar.gz: faa8356ddbe9a7c969a7f89fbdb021b85c3d7fc0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6de9c96633fa6aa7f94ccb23e6005ff22212760b429a21a6d4150ac952c9010dd03c054e5bf92e7c2fc017c453ae710928c4f297d88e6a75229ea0bac4495499
|
7
|
+
data.tar.gz: 123daec4598ece8057386290c63ad1994be00558111af62bfc342a495dd5ea13e0dd75f86395760b26ba0362a46a679b464f43e92769b0ffa2439465697c491f
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -239,6 +239,24 @@ Examples:
|
|
239
239
|
publish_all: true
|
240
240
|
```
|
241
241
|
|
242
|
+
### expose
|
243
|
+
|
244
|
+
Expose a port or a range of ports from the container without publishing it to your host.
|
245
|
+
|
246
|
+
The default value is `nil`.
|
247
|
+
|
248
|
+
Examples:
|
249
|
+
|
250
|
+
```yml
|
251
|
+
expose: 80
|
252
|
+
```
|
253
|
+
|
254
|
+
```yml
|
255
|
+
expose:
|
256
|
+
- 80
|
257
|
+
- 22
|
258
|
+
```
|
259
|
+
|
242
260
|
### volume
|
243
261
|
|
244
262
|
Adds data volume(s) to the container.
|
@@ -105,6 +105,7 @@ module Kitchen
|
|
105
105
|
Array(config[:volume]).each { |vol| cmd << " -v #{vol}" }
|
106
106
|
Array(config[:volumes_from]).each { |vf| cmd << " --volumes-from #{vf}" }
|
107
107
|
Array(config[:link]).each { |link| cmd << " --link #{link}" }
|
108
|
+
Array(config[:expose]).each { |exp| cmd << " --expose #{exp}" }
|
108
109
|
cmd << " #{image} #{config[:command]}"
|
109
110
|
end
|
110
111
|
|
@@ -120,6 +120,7 @@ describe Kitchen::Driver::DockerCli, "docker_run_command" do
|
|
120
120
|
:volume => '/dev:/dev',
|
121
121
|
:volumes_from => 'data',
|
122
122
|
:link => 'mysql:db',
|
123
|
+
:expose => 80,
|
123
124
|
:memory_limit => '256m',
|
124
125
|
:cpu_shares => 512,
|
125
126
|
:network => 'none',
|
@@ -129,7 +130,7 @@ describe Kitchen::Driver::DockerCli, "docker_run_command" do
|
|
129
130
|
end
|
130
131
|
|
131
132
|
example do
|
132
|
-
cmd = "run -d -t --name web -P -m 256m -c 512 --privileged --net none -h example.local -p 80:8080 -p 22:2222 -v /dev:/dev --volumes-from data --link mysql:db test /bin/bash"
|
133
|
+
cmd = "run -d -t --name web -P -m 256m -c 512 --privileged --net none -h example.local -p 80:8080 -p 22:2222 -v /dev:/dev --volumes-from data --link mysql:db --expose 80 test /bin/bash"
|
133
134
|
expect(@docker_cli.docker_run_command('test')).to eq cmd
|
134
135
|
end
|
135
136
|
end
|