kitchen-docker 2.6.0 → 2.7.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 +5 -5
- data/.kitchen.yml +9 -7
- data/.travis.yml +2 -2
- data/CHANGELOG.md +6 -0
- data/README.md +7 -1
- data/lib/kitchen/driver/docker.rb +23 -15
- data/lib/kitchen/driver/docker_version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: e6def5c4cbdeb612e67180f08dc4126705ed5f118ef4b4a3f4c29dd93e6ee847
|
4
|
+
data.tar.gz: 5d89415858f3744241fe6287bca0f0a7c489e9a1d21317f4ef4549c4c9e29933
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9123862cd9ff7e5f6c72aca64019cd3a046592829cfcb69bbf38ab56457c1ee5a4549e09050ae3eb9a701645f59e71d29c17834dfa9c599faf0b7782d60cdda2
|
7
|
+
data.tar.gz: 7c0d27e35a005a1c015228d906ebe538e9e782040d1167d1f3bbf2354ea49e88813266a9b2272ec6111c32b3f88dde8328af2ffc961f13e3895ec1331eb53de5
|
data/.kitchen.yml
CHANGED
@@ -10,19 +10,21 @@ provisioner:
|
|
10
10
|
name: dummy
|
11
11
|
|
12
12
|
platforms:
|
13
|
-
- name: ubuntu-12.04
|
14
13
|
- name: ubuntu-14.04
|
15
14
|
- name: ubuntu-16.04
|
16
15
|
- name: centos-6
|
17
16
|
- name: centos-7
|
18
|
-
- name: debian
|
19
|
-
- name:
|
17
|
+
- name: debian-8
|
18
|
+
- name: opensuse-42.2
|
20
19
|
driver:
|
21
|
-
image:
|
22
|
-
|
20
|
+
image: opensuse:42.2
|
21
|
+
# - name: arch
|
22
|
+
# driver:
|
23
|
+
# image: base/archlinux
|
24
|
+
# provision_command: true
|
23
25
|
- name: unknown
|
24
26
|
driver:
|
25
|
-
image: ubuntu:
|
27
|
+
image: ubuntu:16.04
|
26
28
|
platform: ubuntu
|
27
29
|
- name: dockerfile
|
28
30
|
driver:
|
@@ -39,7 +41,7 @@ suites:
|
|
39
41
|
driver:
|
40
42
|
build_context: false
|
41
43
|
- name: capabilities
|
42
|
-
excludes: [arch,unknown,centos-7,centos-6,dockerfile]
|
44
|
+
excludes: [arch,unknown,centos-7,centos-6,dockerfile,opensuse-42.2]
|
43
45
|
driver:
|
44
46
|
provision_command:
|
45
47
|
- curl -L https://www.chef.io/chef/install.sh | bash
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# Kitchen-Docker Changelog
|
2
2
|
|
3
|
+
## 2.7.0
|
4
|
+
|
5
|
+
* Support for SUSE-based container images.
|
6
|
+
* Improved support for build context shipping.
|
7
|
+
* Changed `use_sudo` to default to `false` in keeping with modern Docker usage.
|
8
|
+
|
3
9
|
## 2.6.0
|
4
10
|
|
5
11
|
* Set container name with information from the run so you can identify them
|
data/README.md
CHANGED
@@ -3,7 +3,6 @@
|
|
3
3
|
[](https://travis-ci.org/test-kitchen/kitchen-docker)
|
4
4
|
[](https://rubygems.org/gems/kitchen-docker)
|
5
5
|
[](https://codecov.io/github/test-kitchen/kitchen-docker)
|
6
|
-
[](https://gemnasium.com/test-kitchen/kitchen-docker)
|
7
6
|
[](https://www.apache.org/licenses/LICENSE-2.0)
|
8
7
|
|
9
8
|
A Test Kitchen Driver for Docker.
|
@@ -100,6 +99,12 @@ Examples:
|
|
100
99
|
socket: tcp://docker.example.com:4242
|
101
100
|
```
|
102
101
|
|
102
|
+
If you use [Docker for Windows](https://docs.docker.com/docker-for-windows/)
|
103
|
+
|
104
|
+
```yaml
|
105
|
+
socket: npipe:////./pipe/docker_engine
|
106
|
+
```
|
107
|
+
|
103
108
|
If you use [Boot2Docker](https://github.com/boot2docker/boot2docker)
|
104
109
|
or [docker-machine](https://docs.docker.com/machine/get-started/) set
|
105
110
|
your `DOCKER_HOST` environment variable properly with `export
|
@@ -127,6 +132,7 @@ suite container for Test Kitchen. Kitchen Docker currently supports:
|
|
127
132
|
* `debian` or `ubuntu`
|
128
133
|
* `rhel` or `centos`
|
129
134
|
* `gentoo` or `gentoo-paludis`
|
135
|
+
* `opensuse` or `sles`
|
130
136
|
|
131
137
|
The default will be computed, using the platform name (see the Default
|
132
138
|
Configuration section for more details).
|
@@ -57,9 +57,7 @@ module Kitchen
|
|
57
57
|
default_config :build_options, nil
|
58
58
|
default_config :run_options, nil
|
59
59
|
|
60
|
-
default_config :use_sudo
|
61
|
-
!driver.remote_socket?
|
62
|
-
end
|
60
|
+
default_config :use_sudo, false
|
63
61
|
|
64
62
|
default_config :image do |driver|
|
65
63
|
driver.default_image
|
@@ -202,8 +200,7 @@ module Kitchen
|
|
202
200
|
platform = case config[:platform]
|
203
201
|
when 'debian', 'ubuntu'
|
204
202
|
disable_upstart = <<-eos
|
205
|
-
RUN dpkg-divert --local --rename --add /sbin/initctl
|
206
|
-
RUN ln -sf /bin/true /sbin/initctl
|
203
|
+
RUN [ ! -f "/sbin/initctl" ] || dpkg-divert --local --rename --add /sbin/initctl && ln -sf /bin/true /sbin/initctl
|
207
204
|
eos
|
208
205
|
packages = <<-eos
|
209
206
|
ENV DEBIAN_FRONTEND noninteractive
|
@@ -217,8 +214,15 @@ module Kitchen
|
|
217
214
|
ENV container docker
|
218
215
|
RUN yum clean all
|
219
216
|
RUN yum install -y sudo openssh-server openssh-clients which curl
|
220
|
-
RUN ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N ''
|
221
|
-
RUN ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N ''
|
217
|
+
RUN [ -f "/etc/ssh/ssh_host_rsa_key" ] || ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N ''
|
218
|
+
RUN [ -f "/etc/ssh/ssh_host_dsa_key" ] || ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N ''
|
219
|
+
eos
|
220
|
+
when 'opensuse', 'sles'
|
221
|
+
<<-eos
|
222
|
+
ENV container docker
|
223
|
+
RUN zypper install -y sudo openssh which curl
|
224
|
+
RUN [ -f "/etc/ssh/ssh_host_rsa_key" ] || ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N ''
|
225
|
+
RUN [ -f "/etc/ssh/ssh_host_dsa_key" ] || ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N ''
|
222
226
|
eos
|
223
227
|
when 'arch'
|
224
228
|
# See https://bugs.archlinux.org/task/47052 for why we
|
@@ -227,23 +231,23 @@ module Kitchen
|
|
227
231
|
RUN pacman --noconfirm -Sy archlinux-keyring
|
228
232
|
RUN pacman-db-upgrade
|
229
233
|
RUN pacman --noconfirm -Sy openssl openssh sudo curl
|
230
|
-
RUN ssh-keygen -A -t rsa -f /etc/ssh/ssh_host_rsa_key
|
231
|
-
RUN ssh-keygen -A -t dsa -f /etc/ssh/ssh_host_dsa_key
|
234
|
+
RUN [ -f "/etc/ssh/ssh_host_rsa_key" ] || ssh-keygen -A -t rsa -f /etc/ssh/ssh_host_rsa_key
|
235
|
+
RUN [ -f "/etc/ssh/ssh_host_dsa_key" ] || ssh-keygen -A -t dsa -f /etc/ssh/ssh_host_dsa_key
|
232
236
|
RUN echo >/etc/security/limits.conf
|
233
237
|
eos
|
234
238
|
when 'gentoo'
|
235
239
|
<<-eos
|
236
|
-
RUN emerge sync
|
240
|
+
RUN emerge --sync
|
237
241
|
RUN emerge net-misc/openssh app-admin/sudo
|
238
|
-
RUN ssh-keygen -A -t rsa -f /etc/ssh/ssh_host_rsa_key
|
239
|
-
RUN ssh-keygen -A -t dsa -f /etc/ssh/ssh_host_dsa_key
|
242
|
+
RUN [ -f "/etc/ssh/ssh_host_rsa_key" ] || ssh-keygen -A -t rsa -f /etc/ssh/ssh_host_rsa_key
|
243
|
+
RUN [ -f "/etc/ssh/ssh_host_dsa_key" ] || ssh-keygen -A -t dsa -f /etc/ssh/ssh_host_dsa_key
|
240
244
|
eos
|
241
245
|
when 'gentoo-paludis'
|
242
246
|
<<-eos
|
243
247
|
RUN cave sync
|
244
248
|
RUN cave resolve -zx net-misc/openssh app-admin/sudo
|
245
|
-
RUN ssh-keygen -A -t rsa -f /etc/ssh/ssh_host_rsa_key
|
246
|
-
RUN ssh-keygen -A -t dsa -f /etc/ssh/ssh_host_dsa_key
|
249
|
+
RUN [ -f "/etc/ssh/ssh_host_rsa_key" ] || ssh-keygen -A -t rsa -f /etc/ssh/ssh_host_rsa_key
|
250
|
+
RUN [ -f "/etc/ssh/ssh_host_dsa_key" ] || ssh-keygen -A -t dsa -f /etc/ssh/ssh_host_dsa_key
|
247
251
|
eos
|
248
252
|
else
|
249
253
|
raise ActionFailed,
|
@@ -307,7 +311,7 @@ module Kitchen
|
|
307
311
|
output = begin
|
308
312
|
file.write(dockerfile)
|
309
313
|
file.close
|
310
|
-
docker_command("#{cmd} -f #{Shellwords.escape(file
|
314
|
+
docker_command("#{cmd} -f #{Shellwords.escape(dockerfile_path(file))} #{build_context}", :input => dockerfile_contents)
|
311
315
|
ensure
|
312
316
|
file.close unless file.closed?
|
313
317
|
file.unlink
|
@@ -410,6 +414,10 @@ module Kitchen
|
|
410
414
|
end
|
411
415
|
end
|
412
416
|
|
417
|
+
def dockerfile_path(file)
|
418
|
+
config[:build_context] ? Pathname.new(file.path).relative_path_from(Pathname.pwd).to_s : file.path
|
419
|
+
end
|
420
|
+
|
413
421
|
end
|
414
422
|
end
|
415
423
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kitchen-docker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Porter
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-07-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: test-kitchen
|
@@ -231,7 +231,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
231
231
|
version: '0'
|
232
232
|
requirements: []
|
233
233
|
rubyforge_project:
|
234
|
-
rubygems_version: 2.6
|
234
|
+
rubygems_version: 2.7.6
|
235
235
|
signing_key:
|
236
236
|
specification_version: 4
|
237
237
|
summary: A Docker Driver for Test Kitchen
|