kitchen-docker_cli 0.3.1 → 0.4.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/.kitchen.yml +0 -2
- data/CHANGELOG.md +8 -0
- data/README.md +16 -6
- data/lib/kitchen/driver/docker_cli.rb +15 -11
- data/lib/kitchen/driver/docker_cli_version.rb +1 -1
- 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: 6b0d097399f490533674ea2fa855615f81995df6
|
4
|
+
data.tar.gz: 60cea728ef7e62c624913c930aabed2445a53d9f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7dd67ba5691edebefd8c1d1c47c4fb52bec706fc280e089f065a756bef39fd152ce2348b699fb8c5efb0b5d8b5511fcf8348388780292b97b9e00d039fc94d32
|
7
|
+
data.tar.gz: 8a76f858b39728ad3584695a331943e56f689c56a055429063289ec5b6c4e7944edb2063e2754af0457c7c4ce4a39e2098ada126c0dfb5277787df1a841f13ed
|
data/.kitchen.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
## 0.4.0
|
2
|
+
|
3
|
+
* Pull request [#2][]: Add custom `Dockerfile` support ([@grubernaut][])
|
4
|
+
|
1
5
|
## 0.3.1
|
2
6
|
|
3
7
|
* Change dependency version of `test-kitchen`
|
@@ -17,3 +21,7 @@
|
|
17
21
|
## 0.1.0.alpha
|
18
22
|
|
19
23
|
* Initial release
|
24
|
+
|
25
|
+
<!--- The following link definition list is generated by PimpMyChangelog --->
|
26
|
+
[#2]: https://github.com/marcy-terui/kitchen-docker_cli/issues/2
|
27
|
+
[@grubernaut]: https://github.com/grubernaut
|
data/README.md
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
# <a name="title"></a> Kitchen::DockerCli [](http://badge.fury.io/rb/kitchen-docker_cli) [](https://travis-ci.org/marcy-terui/kitchen-docker_cli) [](https://coveralls.io/r/marcy-terui/kitchen-docker_cli)
|
2
2
|
A Test Kitchen Driver for Docker command line interface.
|
3
3
|
|
4
|
-
This plugin is created with only Docker CLI functions.
|
4
|
+
This plugin is created with only Docker CLI functions.
|
5
5
|
Therefore, we can test with an environment that has no extra software such as ```sshd```.
|
6
6
|
|
7
7
|
## <a name="requirements"></a> Requirements
|
8
8
|
|
9
9
|
- Test-Kitchen (>= 1.3)
|
10
10
|
|
11
|
-
- Docker (>= 1.3)
|
11
|
+
- Docker (>= 1.3)
|
12
12
|
This driver uses ```docker exec``` command.
|
13
13
|
|
14
|
-
- tar (GNU Tar)
|
14
|
+
- tar (GNU Tar)
|
15
15
|
|
16
16
|
## <a name="installation"></a> Installation and Setup
|
17
17
|
|
@@ -146,8 +146,6 @@ Examples:
|
|
146
146
|
link: mysql:db
|
147
147
|
```
|
148
148
|
|
149
|
-
Examples:
|
150
|
-
|
151
149
|
```yml
|
152
150
|
link:
|
153
151
|
- mysql:db
|
@@ -156,7 +154,7 @@ Examples:
|
|
156
154
|
|
157
155
|
### publish_all
|
158
156
|
|
159
|
-
Publish all exposed ports to the host interfaces.
|
157
|
+
Publish all exposed ports to the host interfaces.
|
160
158
|
This option used to communicate between some containers.
|
161
159
|
|
162
160
|
The default value is `false`.
|
@@ -183,6 +181,18 @@ Examples:
|
|
183
181
|
- <%= Dir::pwd %>:/var:rw
|
184
182
|
```
|
185
183
|
|
184
|
+
### dockerfile
|
185
|
+
|
186
|
+
Create test image using a supplied dockerfile, instead of the default dockerfile created.
|
187
|
+
For best results, please:
|
188
|
+
- Ensure Package Repositories are updated
|
189
|
+
- Ensure Dockerfile installs sudo, curl and tar
|
190
|
+
- If Ubuntu/Debian, Set DEBIAN_FRONTEND to noninteractive
|
191
|
+
|
192
|
+
```yml
|
193
|
+
dockerfile: my/dockerfile
|
194
|
+
```
|
195
|
+
|
186
196
|
## <a name="development"></a> Development
|
187
197
|
|
188
198
|
* Source hosted at [GitHub][repo]
|
@@ -170,19 +170,23 @@ module Kitchen
|
|
170
170
|
end
|
171
171
|
|
172
172
|
def docker_file
|
173
|
-
|
174
|
-
|
175
|
-
when 'debian', 'ubuntu'
|
176
|
-
file << 'RUN apt-get update'
|
177
|
-
file << 'RUN apt-get -y install sudo curl tar'
|
178
|
-
when 'rhel', 'centos'
|
179
|
-
file << 'RUN yum clean all'
|
180
|
-
file << 'RUN yum -y install sudo curl tar'
|
173
|
+
if config[:dockerfile]
|
174
|
+
file = IO.read(File.expand_path(config[:dockerfile]))
|
181
175
|
else
|
182
|
-
|
176
|
+
file = ["FROM #{config[:image]}"]
|
177
|
+
case config[:platform]
|
178
|
+
when 'debian', 'ubuntu'
|
179
|
+
file << 'RUN apt-get update'
|
180
|
+
file << 'RUN apt-get -y install sudo curl tar'
|
181
|
+
when 'rhel', 'centos'
|
182
|
+
file << 'RUN yum clean all'
|
183
|
+
file << 'RUN yum -y install sudo curl tar'
|
184
|
+
else
|
185
|
+
# TODO: Support other distribution
|
186
|
+
end
|
187
|
+
Array(config[:run_command]).each { |cmd| file << "RUN #{cmd}" }
|
188
|
+
file.join("\n")
|
183
189
|
end
|
184
|
-
Array(config[:run_command]).each { |cmd| file << "RUN #{cmd}" }
|
185
|
-
file.join("\n")
|
186
190
|
end
|
187
191
|
|
188
192
|
def execute(cmd, opts = {})
|
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.4.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-01-
|
11
|
+
date: 2015-01-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: test-kitchen
|