Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/kitchen/docker/helpers/dockerfile_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ def rhel_platform
<<-CODE
ENV container=docker
RUN yum clean all
RUN yum install -y sudo openssh-server openssh-clients which curl
RUN yum install -y sudo openssh-server openssh-clients which
RUN which curl || yum install -y curl
RUN [ -f "/etc/ssh/ssh_host_rsa_key" ] || ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N ''
CODE
end
Expand Down
5 changes: 3 additions & 2 deletions spec/dockerfile_helper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,10 @@ def initialize(config = {})
expect(result).not_to include("--allowerasing")
end

it "installs required packages including curl" do
it "installs required packages including curl if needed" do
result = helper.rhel_platform
expect(result).to include("sudo openssh-server openssh-clients which curl")
expect(result).to include("sudo openssh-server openssh-clients which")
expect(result).to include("which curl || yum install -y curl")
end
end

Expand Down
Loading