lib/kitchen/docker/helpers/dockerfile_helper.rb in kitchen-docker-2.12.0 vs lib/kitchen/docker/helpers/dockerfile_helper.rb in kitchen-docker-2.13.0
- old
+ new
@@ -34,10 +34,14 @@
gentoo_paludis_platform
when 'opensuse/tumbleweed', 'opensuse/leap', 'opensuse', 'sles'
opensuse_platform
when 'rhel', 'centos', 'oraclelinux', 'amazonlinux', 'almalinux', 'rockylinux'
rhel_platform
+ when 'centosstream'
+ centosstream_platform
+ when 'photon'
+ photonos_platform
else
raise ActionFailed, "Unknown platform '#{config[:platform]}'"
end
end
@@ -109,9 +113,29 @@
ENV container docker
RUN yum clean all
RUN yum install -y sudo openssh-server openssh-clients which curl
RUN [ -f "/etc/ssh/ssh_host_rsa_key" ] || ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N ''
RUN [ -f "/etc/ssh/ssh_host_dsa_key" ] || ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N ''
+ CODE
+ end
+
+ def centosstream_platform
+ <<-CODE
+ ENV container docker
+ RUN yum clean all
+ RUN yum install -y sudo openssh-server openssh-clients which
+ RUN [ -f "/etc/ssh/ssh_host_rsa_key" ] || ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N ''
+ RUN [ -f "/etc/ssh/ssh_host_dsa_key" ] || ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N ''
+ CODE
+ end
+
+ def photonos_platform
+ <<-CODE
+ ENV container docker
+ RUN tdnf clean all
+ RUN tdnf install -y sudo openssh-server openssh-clients which curl
+ RUN [ -f "/etc/ssh/ssh_host_ecdsa_key" ] || ssh-keygen -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key -N ''
+ RUN [ -f "/etc/ssh/ssh_host_ed25519_key" ] || ssh-keygen -t ed25519 -f /etc/ssh/ssh_host_ed25519_key -N ''
CODE
end
def dockerfile_base_linux(username, homedir)
<<-CODE