kitchen-docker 2.13.0 → 2.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/README.md +10 -0
- data/lib/kitchen/docker/docker_version.rb +1 -1
- data/lib/kitchen/docker/helpers/dockerfile_helper.rb +28 -2
- data/lib/kitchen/docker/helpers/image_helper.rb +3 -2
- data/lib/kitchen/driver/docker.rb +1 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a90dcbcb9d7867d3600976b04316ebc8bb26edc05c67913a539748bac45c52a
|
4
|
+
data.tar.gz: 582e8c53e995ec7d772a8d8580f582edbbff4a64648fc4e5ac41d657c40a2a59
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 121b7a903fe8748c082b9746ed47df1a159652345f1a2e0c26aef04cf1f07e6c69b82b18fa3ab49ed17b93bddfbae69f32bb3839ccb41d3f8ffde9654bf574df
|
7
|
+
data.tar.gz: be747b9b96ea67b8848f25ad77d68edf5272201daafeb3f5f93902ceac7e2899322db2ebd5bed75682a81dafa4e85642d2872efb7ad4a9f9479f8cfe2f1de627
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
# Kitchen-Docker Changelog
|
2
2
|
|
3
|
+
Future CHANGELOG notes will be in GitHub release notes
|
4
|
+
|
5
|
+
## 2.14.0 - November 13, 2023
|
6
|
+
|
7
|
+
- Make sure the /etc/sudoers.d directory exists by @garethgreenaway in [#397](https://github.com/test-kitchen/kitchen-docker/pull/397)
|
8
|
+
- Breaking almalinux platform out by @garethgreenaway [#398](https://github.com/test-kitchen/kitchen-docker/pull/398)
|
9
|
+
- fix: parse_image_id: Process "docker build" output in reverse line order by @terminalmage in [#400](https://github.com/test-kitchen/kitchen-docker/pull/400)
|
10
|
+
- Allow build temporary Dockerfile in configured custom_dir by @Val in [294](https://github.com/test-kitchen/kitchen-docker/pull/294)
|
11
|
+
|
3
12
|
## 2.13.0 - June 10, 2022
|
4
13
|
|
5
14
|
- Added CentOSStream and PhotonOS - [@garethgreenaway](https://github.com/garethgreenaway)
|
data/README.md
CHANGED
@@ -583,6 +583,16 @@ Examples:
|
|
583
583
|
net: br3
|
584
584
|
```
|
585
585
|
|
586
|
+
### build_tempdir
|
587
|
+
|
588
|
+
Relative (to `build_context`) temporary directory path for built Dockerfile.
|
589
|
+
|
590
|
+
Example:
|
591
|
+
|
592
|
+
```yaml
|
593
|
+
build_tempdir: .kitchen
|
594
|
+
```
|
595
|
+
|
586
596
|
### use_internal_docker_network
|
587
597
|
|
588
598
|
If you want to use kitchen-docker from within another Docker container you'll
|
@@ -34,10 +34,14 @@ module Kitchen
|
|
34
34
|
gentoo_paludis_platform
|
35
35
|
when 'opensuse/tumbleweed', 'opensuse/leap', 'opensuse', 'sles'
|
36
36
|
opensuse_platform
|
37
|
-
when 'rhel', 'centos', 'oraclelinux', 'amazonlinux'
|
37
|
+
when 'rhel', 'centos', 'oraclelinux', 'amazonlinux'
|
38
38
|
rhel_platform
|
39
39
|
when 'centosstream'
|
40
40
|
centosstream_platform
|
41
|
+
when 'almalinux'
|
42
|
+
almalinux_platform
|
43
|
+
when 'rockylinux'
|
44
|
+
rockylinux_platform
|
41
45
|
when 'photon'
|
42
46
|
photonos_platform
|
43
47
|
else
|
@@ -103,7 +107,7 @@ module Kitchen
|
|
103
107
|
def opensuse_platform
|
104
108
|
<<-CODE
|
105
109
|
ENV container docker
|
106
|
-
RUN zypper install -y sudo openssh which curl
|
110
|
+
RUN zypper install -y sudo openssh which curl gawk
|
107
111
|
RUN /usr/sbin/sshd-gen-keys-start
|
108
112
|
CODE
|
109
113
|
end
|
@@ -128,6 +132,26 @@ module Kitchen
|
|
128
132
|
CODE
|
129
133
|
end
|
130
134
|
|
135
|
+
def almalinux_platform
|
136
|
+
<<-CODE
|
137
|
+
ENV container docker
|
138
|
+
RUN yum clean all
|
139
|
+
RUN yum install -y sudo openssh-server openssh-clients which
|
140
|
+
RUN [ -f "/etc/ssh/ssh_host_rsa_key" ] || ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N ''
|
141
|
+
RUN [ -f "/etc/ssh/ssh_host_dsa_key" ] || ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N ''
|
142
|
+
CODE
|
143
|
+
end
|
144
|
+
|
145
|
+
def rockylinux_platform
|
146
|
+
<<-CODE
|
147
|
+
ENV container docker
|
148
|
+
RUN yum clean all
|
149
|
+
RUN yum install -y sudo openssh-server openssh-clients which
|
150
|
+
RUN [ -f "/etc/ssh/ssh_host_rsa_key" ] || ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N ''
|
151
|
+
RUN [ -f "/etc/ssh/ssh_host_dsa_key" ] || ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N ''
|
152
|
+
CODE
|
153
|
+
end
|
154
|
+
|
131
155
|
def photonos_platform
|
132
156
|
<<-CODE
|
133
157
|
ENV container docker
|
@@ -143,6 +167,8 @@ module Kitchen
|
|
143
167
|
RUN if ! getent passwd #{username}; then \
|
144
168
|
useradd -d #{homedir} -m -s /bin/bash -p '*' #{username}; \
|
145
169
|
fi
|
170
|
+
RUN mkdir -p /etc/sudoers.d
|
171
|
+
RUN chmod 0750 /etc/sudoers.d
|
146
172
|
RUN echo "#{username} ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/#{username}
|
147
173
|
RUN echo "Defaults !requiretty" >> /etc/sudoers.d/#{username}
|
148
174
|
RUN mkdir -p #{homedir}/.ssh
|
@@ -13,6 +13,7 @@
|
|
13
13
|
|
14
14
|
require 'kitchen'
|
15
15
|
require 'kitchen/configurable'
|
16
|
+
require 'pathname'
|
16
17
|
require_relative 'cli_helper'
|
17
18
|
require_relative 'container_helper'
|
18
19
|
|
@@ -25,7 +26,7 @@ module Kitchen
|
|
25
26
|
include Kitchen::Docker::Helpers::ContainerHelper
|
26
27
|
|
27
28
|
def parse_image_id(output)
|
28
|
-
output.
|
29
|
+
output.split("\n").reverse_each do |line|
|
29
30
|
if line =~ /writing image (sha256:[[:xdigit:]]{64})(?: \d*\.\ds)? done/i
|
30
31
|
img_id = line[/writing image (sha256:[[:xdigit:]]{64})(?: \d*\.\ds)? done/i,1]
|
31
32
|
return img_id
|
@@ -50,7 +51,7 @@ module Kitchen
|
|
50
51
|
extra_build_options = config_to_options(config[:build_options])
|
51
52
|
cmd << " #{extra_build_options}" unless extra_build_options.empty?
|
52
53
|
dockerfile_contents = dockerfile
|
53
|
-
file = Tempfile.new('Dockerfile-kitchen',
|
54
|
+
file = Tempfile.new('Dockerfile-kitchen', Pathname.pwd + config[:build_tempdir])
|
54
55
|
cmd << " -f #{Shellwords.escape(dockerfile_path(file))}" if config[:build_context]
|
55
56
|
build_context = config[:build_context] ? '.' : '-'
|
56
57
|
output = begin
|
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.15.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: 2023-11-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: test-kitchen
|
@@ -266,7 +266,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
266
266
|
- !ruby/object:Gem::Version
|
267
267
|
version: '0'
|
268
268
|
requirements: []
|
269
|
-
rubygems_version: 3.
|
269
|
+
rubygems_version: 3.4.10
|
270
270
|
signing_key:
|
271
271
|
specification_version: 4
|
272
272
|
summary: A Docker Driver for Test Kitchen
|