From 4224c11b5fcc8e8e641b2b744a5020aa3a511e13 Mon Sep 17 00:00:00 2001 From: Matt Clay Date: Sun, 20 Mar 2016 10:48:11 -0700 Subject: [PATCH] Combine new RUN commands into one RUN command. --- test/utils/docker/centos6/Dockerfile | 12 ++++++------ test/utils/docker/centos7/Dockerfile | 12 ++++++------ test/utils/docker/fedora-rawhide/Dockerfile | 10 +++++----- test/utils/docker/fedora23/Dockerfile | 10 +++++----- test/utils/docker/ubuntu1204/Dockerfile | 6 +++--- test/utils/docker/ubuntu1404/Dockerfile | 6 +++--- 6 files changed, 28 insertions(+), 28 deletions(-) diff --git a/test/utils/docker/centos6/Dockerfile b/test/utils/docker/centos6/Dockerfile index d0ffed83c06..dd53b6e2efc 100644 --- a/test/utils/docker/centos6/Dockerfile +++ b/test/utils/docker/centos6/Dockerfile @@ -35,11 +35,11 @@ RUN /bin/sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers RUN mkdir /etc/ansible/ RUN /bin/echo -e '[local]\nlocalhost ansible_connection=local' > /etc/ansible/hosts #VOLUME /sys/fs/cgroup /run /tmp -RUN ssh-keygen -q -t rsa1 -N '' -f /etc/ssh/ssh_host_key -RUN ssh-keygen -q -t dsa -N '' -f /etc/ssh/ssh_host_dsa_key -RUN ssh-keygen -q -t rsa -N '' -f /etc/ssh/ssh_host_rsa_key -RUN ssh-keygen -q -t rsa -N '' -f /root/.ssh/id_rsa -RUN cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys -RUN for key in /etc/ssh/ssh_host_*_key.pub; do echo "localhost $(cat ${key})" >> /root/.ssh/known_hosts; done +RUN ssh-keygen -q -t rsa1 -N '' -f /etc/ssh/ssh_host_key && \ + ssh-keygen -q -t dsa -N '' -f /etc/ssh/ssh_host_dsa_key && \ + ssh-keygen -q -t rsa -N '' -f /etc/ssh/ssh_host_rsa_key && \ + ssh-keygen -q -t rsa -N '' -f /root/.ssh/id_rsa && \ + cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys && \ + for key in /etc/ssh/ssh_host_*_key.pub; do echo "localhost $(cat ${key})" >> /root/.ssh/known_hosts; done ENV container=docker CMD ["/sbin/init"] diff --git a/test/utils/docker/centos7/Dockerfile b/test/utils/docker/centos7/Dockerfile index 1114c8adb99..a23707ef582 100644 --- a/test/utils/docker/centos7/Dockerfile +++ b/test/utils/docker/centos7/Dockerfile @@ -40,11 +40,11 @@ RUN /usr/bin/sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers RUN mkdir /etc/ansible/ RUN /usr/bin/echo -e '[local]\nlocalhost ansible_connection=local' > /etc/ansible/hosts VOLUME /sys/fs/cgroup /run /tmp -RUN ssh-keygen -q -t rsa1 -N '' -f /etc/ssh/ssh_host_key -RUN ssh-keygen -q -t dsa -N '' -f /etc/ssh/ssh_host_dsa_key -RUN ssh-keygen -q -t rsa -N '' -f /etc/ssh/ssh_host_rsa_key -RUN ssh-keygen -q -t rsa -N '' -f /root/.ssh/id_rsa -RUN cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys -RUN for key in /etc/ssh/ssh_host_*_key.pub; do echo "localhost $(cat ${key})" >> /root/.ssh/known_hosts; done +RUN ssh-keygen -q -t rsa1 -N '' -f /etc/ssh/ssh_host_key && \ + ssh-keygen -q -t dsa -N '' -f /etc/ssh/ssh_host_dsa_key && \ + ssh-keygen -q -t rsa -N '' -f /etc/ssh/ssh_host_rsa_key && \ + ssh-keygen -q -t rsa -N '' -f /root/.ssh/id_rsa && \ + cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys && \ + for key in /etc/ssh/ssh_host_*_key.pub; do echo "localhost $(cat ${key})" >> /root/.ssh/known_hosts; done ENV container=docker CMD ["/usr/sbin/init"] diff --git a/test/utils/docker/fedora-rawhide/Dockerfile b/test/utils/docker/fedora-rawhide/Dockerfile index 14c77dac3db..7587b93ab46 100644 --- a/test/utils/docker/fedora-rawhide/Dockerfile +++ b/test/utils/docker/fedora-rawhide/Dockerfile @@ -45,10 +45,10 @@ RUN /usr/bin/sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers RUN mkdir /etc/ansible/ RUN /usr/bin/echo -e '[local]\nlocalhost ansible_connection=local' > /etc/ansible/hosts VOLUME /sys/fs/cgroup /run /tmp -RUN ssh-keygen -q -t dsa -N '' -f /etc/ssh/ssh_host_dsa_key -RUN ssh-keygen -q -t rsa -N '' -f /etc/ssh/ssh_host_rsa_key -RUN ssh-keygen -q -t rsa -N '' -f /root/.ssh/id_rsa -RUN cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys -RUN for key in /etc/ssh/ssh_host_*_key.pub; do echo "localhost $(cat ${key})" >> /root/.ssh/known_hosts; done +RUN ssh-keygen -q -t dsa -N '' -f /etc/ssh/ssh_host_dsa_key && \ + ssh-keygen -q -t rsa -N '' -f /etc/ssh/ssh_host_rsa_key && \ + ssh-keygen -q -t rsa -N '' -f /root/.ssh/id_rsa && \ + cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys && \ + for key in /etc/ssh/ssh_host_*_key.pub; do echo "localhost $(cat ${key})" >> /root/.ssh/known_hosts; done ENV container=docker CMD ["/usr/sbin/init"] diff --git a/test/utils/docker/fedora23/Dockerfile b/test/utils/docker/fedora23/Dockerfile index 1dcb12a254a..a0563743878 100644 --- a/test/utils/docker/fedora23/Dockerfile +++ b/test/utils/docker/fedora23/Dockerfile @@ -46,10 +46,10 @@ RUN /usr/bin/sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers RUN mkdir /etc/ansible/ RUN /usr/bin/echo -e '[local]\nlocalhost ansible_connection=local' > /etc/ansible/hosts VOLUME /sys/fs/cgroup /run /tmp -RUN ssh-keygen -q -t dsa -N '' -f /etc/ssh/ssh_host_dsa_key -RUN ssh-keygen -q -t rsa -N '' -f /etc/ssh/ssh_host_rsa_key -RUN ssh-keygen -q -t rsa -N '' -f /root/.ssh/id_rsa -RUN cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys -RUN for key in /etc/ssh/ssh_host_*_key.pub; do echo "localhost $(cat ${key})" >> /root/.ssh/known_hosts; done +RUN ssh-keygen -q -t dsa -N '' -f /etc/ssh/ssh_host_dsa_key && \ + ssh-keygen -q -t rsa -N '' -f /etc/ssh/ssh_host_rsa_key && \ + ssh-keygen -q -t rsa -N '' -f /root/.ssh/id_rsa && \ + cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys && \ + for key in /etc/ssh/ssh_host_*_key.pub; do echo "localhost $(cat ${key})" >> /root/.ssh/known_hosts; done ENV container=docker CMD ["/usr/sbin/init"] diff --git a/test/utils/docker/ubuntu1204/Dockerfile b/test/utils/docker/ubuntu1204/Dockerfile index f32181e5925..6924bba7032 100644 --- a/test/utils/docker/ubuntu1204/Dockerfile +++ b/test/utils/docker/ubuntu1204/Dockerfile @@ -62,8 +62,8 @@ RUN /bin/sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers RUN mkdir /etc/ansible/ RUN /bin/echo -e "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts RUN locale-gen en_US.UTF-8 -RUN ssh-keygen -q -t rsa -N '' -f /root/.ssh/id_rsa -RUN cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys -RUN for key in /etc/ssh/ssh_host_*_key.pub; do echo "localhost $(cat ${key})" >> /root/.ssh/known_hosts; done +RUN ssh-keygen -q -t rsa -N '' -f /root/.ssh/id_rsa && \ + cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys && \ + for key in /etc/ssh/ssh_host_*_key.pub; do echo "localhost $(cat ${key})" >> /root/.ssh/known_hosts; done ENV container docker CMD ["/sbin/init"] diff --git a/test/utils/docker/ubuntu1404/Dockerfile b/test/utils/docker/ubuntu1404/Dockerfile index 521e1b664dc..51d24c5e03c 100644 --- a/test/utils/docker/ubuntu1404/Dockerfile +++ b/test/utils/docker/ubuntu1404/Dockerfile @@ -59,8 +59,8 @@ RUN /bin/sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers RUN mkdir /etc/ansible/ RUN /bin/echo -e "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts RUN locale-gen en_US.UTF-8 -RUN ssh-keygen -q -t rsa -N '' -f /root/.ssh/id_rsa -RUN cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys -RUN for key in /etc/ssh/ssh_host_*_key.pub; do echo "localhost $(cat ${key})" >> /root/.ssh/known_hosts; done +RUN ssh-keygen -q -t rsa -N '' -f /root/.ssh/id_rsa && \ + cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys && \ + for key in /etc/ssh/ssh_host_*_key.pub; do echo "localhost $(cat ${key})" >> /root/.ssh/known_hosts; done ENV container docker CMD ["/sbin/init"]