lib/kitchen/driver/docker.rb in kitchen-docker-0.4.0 vs lib/kitchen/driver/docker.rb in kitchen-docker-0.5.0
- old
+ new
@@ -90,10 +90,14 @@
RUN echo '127.0.0.1 localhost.localdomain localhost' >> /etc/hosts
RUN useradd -d /home/#{username} -m -s /bin/bash #{username}
RUN echo #{username}:#{password} | chpasswd
RUN echo '#{username} ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
eos
- [from, platform, base].join("\n")
+ custom = ''
+ Array(config[:provision_command]).each do |cmd|
+ custom << "RUN #{cmd}\n"
+ end
+ [from, platform, base, custom].join("\n")
end
def parse_image_id(output)
output.each_line do |line|
if line =~ /image id|build successful|successfully built/i