Skip to content

Commit

Permalink
On Fedora install the dependencies with dnf not yum
Browse files Browse the repository at this point in the history
All currently supported (and a bunch of EOL) Fedora distros have dnf and not yum. We should use that to setup the container.

Signed-off-by: Tim Smith <tsmith@chef.io>
  • Loading branch information
tas50 committed Mar 15, 2019
1 parent bac1803 commit b0cc90c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/kitchen/driver/docker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -216,14 +216,22 @@ def build_dockerfile
RUN apt-get install -y sudo openssh-server curl lsb-release
eos
config[:disable_upstart] ? disable_upstart + packages : packages
when 'rhel', 'centos', 'fedora', 'oraclelinux', 'amazonlinux'
when 'rhel', 'centos', 'oraclelinux', 'amazonlinux'
<<-eos
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 ''
eos
when 'fedora'
<<-eos
ENV container docker
RUN dnf clean all
RUN dnf 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 ''
eos
when 'opensuse', 'sles'
<<-eos
ENV container docker
Expand Down

0 comments on commit b0cc90c

Please # to comment.