kitchen-docker 0.1.2 → 0.1.3

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.
data/README.md CHANGED
@@ -6,6 +6,10 @@ A Test Kitchen Driver for Docker.
6
6
 
7
7
  * [Docker][docker_getting_started]
8
8
 
9
+ ## <a name="issues"></a> Known Issues
10
+
11
+ * Upstart is neutered due to [this issue][docker_upstart_issue].
12
+
9
13
  ## <a name="installation"></a> Installation and Setup
10
14
 
11
15
  Please read the [Driver usage][driver_usage] page for more details.
@@ -17,7 +21,7 @@ Please read the [Driver usage][driver_usage] page for more details.
17
21
  The Docker image to use as the base for the suite containers. You can find
18
22
  images using the [Docker Index][docker_index].
19
23
 
20
- The default value is `ubuntu` ([image][docker_default_image]).
24
+ The default value is `base`, an official Ubuntu [image][docker_default_image].
21
25
 
22
26
  ### <a name="config-platform"></a> platform
23
27
 
@@ -74,7 +78,8 @@ Apache 2.0 (see [LICENSE][license])
74
78
  [license]: https://github.com/portertech/kitchen-docker/blob/master/LICENSE
75
79
  [repo]: https://github.com/portertech/kitchen-docker
76
80
  [docker_getting_started]: http://www.docker.io/gettingstarted/
81
+ [docker_upstart_issue]: https://github.com/dotcloud/docker/issues/223
77
82
  [docker_index]: https://index.docker.io/
78
- [docker_default_image]: https://index.docker.io/_/ubuntu/
83
+ [docker_default_image]: https://index.docker.io/_/base/
79
84
  [driver_usage]: http://docs.kitchen-ci.org/drivers/usage
80
85
  [chef_omnibus_dl]: http://www.opscode.com/chef/install/
@@ -28,7 +28,7 @@ module Kitchen
28
28
  # @author Sean Porter <portertech@gmail.com>
29
29
  class Docker < Kitchen::Driver::SSHBase
30
30
 
31
- default_config :image, 'ubuntu'
31
+ default_config :image, 'base'
32
32
  default_config :platform, 'ubuntu'
33
33
  default_config :port, '22'
34
34
  default_config :username, 'kitchen'
@@ -51,7 +51,7 @@ module Kitchen
51
51
  end
52
52
 
53
53
  def destroy(state)
54
- kill_container(state) if state[:container_id]
54
+ rm_container(state) if state[:container_id]
55
55
  rm_image(state) if state[:image_id]
56
56
  end
57
57
 
@@ -115,7 +115,11 @@ module Kitchen
115
115
 
116
116
  def run_container(state)
117
117
  image_id = state[:image_id]
118
- cmd = "docker run -d #{image_id} /usr/sbin/sshd -D -o UseDNS=no -o UsePAM=no"
118
+ cmd = "docker run -d"
119
+ Array(config[:forward]).each do |port|
120
+ cmd << " -p #{port}"
121
+ end
122
+ cmd << " #{image_id} /usr/sbin/sshd -D -o UseDNS=no -o UsePAM=no"
119
123
  output = run_command(cmd)
120
124
  parse_container_id(output)
121
125
  end
@@ -141,9 +145,9 @@ module Kitchen
141
145
  ssh(ssh_args, 'echo "127.0.0.1 `hostname`" | sudo tee -a /etc/hosts')
142
146
  end
143
147
 
144
- def kill_container(state)
148
+ def rm_container(state)
145
149
  container_id = state[:container_id]
146
- run_command("docker kill #{container_id}")
150
+ run_command("docker rm #{container_id}")
147
151
  end
148
152
 
149
153
  def rm_image(state)
@@ -21,6 +21,6 @@ module Kitchen
21
21
  module Driver
22
22
 
23
23
  # Version string for Docker Kitchen driver
24
- DOCKER_VERSION = "0.1.2"
24
+ DOCKER_VERSION = "0.1.3"
25
25
  end
26
26
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kitchen-docker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-05-15 00:00:00.000000000 Z
12
+ date: 2013-05-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  requirement: !ruby/object:Gem::Requirement
@@ -137,7 +137,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
137
137
  requirements:
138
138
  - - ! '>='
139
139
  - !ruby/object:Gem::Version
140
- hash: 977071307405560001
140
+ hash: -3577795496291438005
141
141
  version: '0'
142
142
  segments:
143
143
  - 0
@@ -146,7 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
146
146
  requirements:
147
147
  - - ! '>='
148
148
  - !ruby/object:Gem::Version
149
- hash: 977071307405560001
149
+ hash: -3577795496291438005
150
150
  version: '0'
151
151
  segments:
152
152
  - 0