kitchen-docker_cli 0.10.0 → 0.11.0

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: 891eba7c6a7936337875c7e2c019e5e9cb8ee836
4
- data.tar.gz: e3cffe6b317c03a15ad962dd1097772aa295fed7
3
+ metadata.gz: 359f46d9d1ce5cd75286176ccd7c95e6e3d1f90c
4
+ data.tar.gz: faa8356ddbe9a7c969a7f89fbdb021b85c3d7fc0
5
5
  SHA512:
6
- metadata.gz: 580b247a7529255ca75d15eb832347a3ae6dc717d3dc3189036e6b31e538d86f836c05986f690f5eebdfac1f558f6db9ddf536cc0ad8228cc14759e4d69566ba
7
- data.tar.gz: 193bbdeb76dac5e26f2c33d882b7c802c4e63805fbc1791638826758eb036080b10bbe20ea6e51ccfd2fadb51f685b62756f1608b955706339972a4e3d9773fe
6
+ metadata.gz: 6de9c96633fa6aa7f94ccb23e6005ff22212760b429a21a6d4150ac952c9010dd03c054e5bf92e7c2fc017c453ae710928c4f297d88e6a75229ea0bac4495499
7
+ data.tar.gz: 123daec4598ece8057386290c63ad1994be00558111af62bfc342a495dd5ea13e0dd75f86395760b26ba0362a46a679b464f43e92769b0ffa2439465697c491f
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.11.0
2
+
3
+ * Add `expose` option
4
+
1
5
  ## 0.10.0
2
6
 
3
7
  * Add `volumes_from` option
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
 
@@ -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.10.0'
24
+ DOCKER_CLI_VERSION = '0.11.0'
25
25
  end
26
26
  end
@@ -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
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.10.0
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Masashi Terui