beaker-docker 1.1.1 → 1.2.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 +10 -5
- data/docker.md +11 -2
- data/lib/beaker/hypervisor/docker.rb +6 -2
- data/lib/beaker-docker/version.rb +1 -1
- data/spec/beaker/hypervisor/docker_spec.rb +17 -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: 0ce1f4aae26967ce3b8f4d3d24db2a23c2a09b19a749d40bdd7c731d64201f3b
|
4
|
+
data.tar.gz: 711d8f36b0f39494206dbf6c06ffc602f213ad8681ba423529d413240c3d9c9c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b7c52174a22413d6aa3a99cd0c9e98e8c3cef1c4f973edf9c3a0bd5c4c5e1c854c87c5147310e93ea387bb08ea1a11e6cd71d4dd44dd291db73619f2663f29bc
|
7
|
+
data.tar.gz: 13bf5b863f187e020040ac56504bae971bc0f27ae07ccd4e598325762782a269d56297cacd00b732a0fdd25e89d746aa7d7193aa8234f225c94c20d304a28ace
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,15 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
-
## [1.
|
3
|
+
## [1.2.0](https://github.com/voxpupuli/beaker-docker/tree/1.2.0) (2022-08-11)
|
4
|
+
|
5
|
+
[Full Changelog](https://github.com/voxpupuli/beaker-docker/compare/1.1.1...1.2.0)
|
6
|
+
|
7
|
+
**Implemented enhancements:**
|
8
|
+
|
9
|
+
- Use ssh-keygen -A on modern Enterprise Linux [\#66](https://github.com/voxpupuli/beaker-docker/pull/66) ([ekohl](https://github.com/ekohl))
|
10
|
+
- Add Docker hostfile parameter docker\_image\_first\_commands [\#65](https://github.com/voxpupuli/beaker-docker/pull/65) ([Rathios](https://github.com/Rathios))
|
11
|
+
|
12
|
+
## [1.1.1](https://github.com/voxpupuli/beaker-docker/tree/1.1.1) (2022-02-17)
|
4
13
|
|
5
14
|
[Full Changelog](https://github.com/voxpupuli/beaker-docker/compare/1.1.0...1.1.1)
|
6
15
|
|
@@ -21,10 +30,6 @@
|
|
21
30
|
|
22
31
|
- Use host\_packages helper to reuse logic from beaker [\#59](https://github.com/voxpupuli/beaker-docker/pull/59) ([ekohl](https://github.com/ekohl))
|
23
32
|
|
24
|
-
**Merged pull requests:**
|
25
|
-
|
26
|
-
- Release 1.1.0 [\#60](https://github.com/voxpupuli/beaker-docker/pull/60) ([ekohl](https://github.com/ekohl))
|
27
|
-
|
28
33
|
## [1.0.1](https://github.com/voxpupuli/beaker-docker/tree/1.0.1) (2021-09-13)
|
29
34
|
|
30
35
|
[Full Changelog](https://github.com/voxpupuli/beaker-docker/compare/1.0.0...1.0.1)
|
data/docker.md
CHANGED
@@ -23,13 +23,22 @@ The base image to use for the container is named by the image key.
|
|
23
23
|
type: foss
|
24
24
|
|
25
25
|
### Docker hosts file, with image modification ###
|
26
|
-
You can specify extra commands to be executed in order to modify the image with the `docker_image_commands`
|
26
|
+
You can specify extra commands to be executed in order to modify the image with the keys `docker_image_commands` and
|
27
|
+
`docker_image_first_commands`.
|
28
|
+
|
29
|
+
`docker_image_commands` is executed after initial setup. `docker_image_first_commands` is executed before any other
|
30
|
+
commands and can be used eg. to configure a proxy.
|
27
31
|
|
28
32
|
HOSTS:
|
29
33
|
ubuntu-12-10:
|
30
34
|
platform: ubuntu-12.10-x64
|
31
35
|
image: ubuntu:12.10
|
32
36
|
hypervisor: docker
|
37
|
+
docker_image_first_commands:
|
38
|
+
- echo 'Acquire::http::Proxy "http://proxy.example.com:3128";'> /etc/apt/apt.conf.d/01proxy
|
39
|
+
- echo "export http_proxy=http://proxy.example.com:3128"> /etc/profile.d/proxy.sh
|
40
|
+
- echo "export https_proxy=http://proxy.example.com:3128">> /etc/profile.d/proxy.sh
|
41
|
+
- echo "export no_proxy=127.0.0.1,::1">> /etc/profile.d/proxy.sh
|
33
42
|
docker_image_commands:
|
34
43
|
- 'apt-get install -y myapp'
|
35
44
|
- 'myapp --setup'
|
@@ -53,7 +62,7 @@ Instead of using ssh as the CMD for a container, beaker will use the entrypoint
|
|
53
62
|
|
54
63
|
HOSTS:
|
55
64
|
puppetserver:
|
56
|
-
platform: ubuntu-1604-x86_64
|
65
|
+
platform: ubuntu-1604-x86_64
|
57
66
|
hypervisor: docker
|
58
67
|
image: puppet/puppetserver-standalone:6.0.1
|
59
68
|
use_image_entry_point: true
|
@@ -401,8 +401,7 @@ module Beaker
|
|
401
401
|
when /el-[89]/, /fedora-(2[2-9]|3[0-9])/
|
402
402
|
container.exec(%w(dnf clean all))
|
403
403
|
container.exec(%w(dnf install -y sudo openssh-server openssh-clients))
|
404
|
-
container.exec(%w(ssh-keygen -
|
405
|
-
container.exec(%w(ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key))
|
404
|
+
container.exec(%w(ssh-keygen -A))
|
406
405
|
container.exec(%w(sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/*))
|
407
406
|
when /^el-/, /centos/, /fedora/, /redhat/, /eos/
|
408
407
|
container.exec(%w(yum clean all))
|
@@ -516,6 +515,11 @@ module Beaker
|
|
516
515
|
ENV container docker
|
517
516
|
EOF
|
518
517
|
|
518
|
+
# Commands before any other commands. Can be used for eg. proxy configuration
|
519
|
+
dockerfile += (host['docker_image_first_commands'] || []).map { |command|
|
520
|
+
"RUN #{command}\n"
|
521
|
+
}.join('')
|
522
|
+
|
519
523
|
# additional options to specify to the sshd
|
520
524
|
# may vary by platform
|
521
525
|
sshd_options = ''
|
@@ -692,6 +692,23 @@ module Beaker
|
|
692
692
|
end
|
693
693
|
end
|
694
694
|
|
695
|
+
it 'should add docker_image_first_commands as RUN statements' do
|
696
|
+
FakeFS.deactivate!
|
697
|
+
platforms.each do |platform|
|
698
|
+
dockerfile = docker.send(:dockerfile_for, {
|
699
|
+
'platform' => platform,
|
700
|
+
'image' => 'foobar',
|
701
|
+
'docker_image_first_commands' => [
|
702
|
+
'special one',
|
703
|
+
'special two',
|
704
|
+
'special three',
|
705
|
+
]
|
706
|
+
})
|
707
|
+
|
708
|
+
expect( dockerfile ).to be =~ /RUN special one\nRUN special two\nRUN special three/
|
709
|
+
end
|
710
|
+
end
|
711
|
+
|
695
712
|
it 'should add docker_image_commands as RUN statements' do
|
696
713
|
FakeFS.deactivate!
|
697
714
|
platforms.each do |platform|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: beaker-docker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vox Pupuli
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2022-
|
14
|
+
date: 2022-08-11 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rspec
|
@@ -158,7 +158,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
158
158
|
- !ruby/object:Gem::Version
|
159
159
|
version: '0'
|
160
160
|
requirements: []
|
161
|
-
rubygems_version: 3.2.
|
161
|
+
rubygems_version: 3.2.33
|
162
162
|
signing_key:
|
163
163
|
specification_version: 4
|
164
164
|
summary: Beaker DSL Extension Helpers!
|