From de4433f39c6cf4258845db2ee8a7757500d943c2 Mon Sep 17 00:00:00 2001 From: William Yeh Date: Wed, 24 Feb 2016 10:10:03 +0800 Subject: Update: use PyPI repo instead of too-old EPEL for CentOS images. Fix: escaping '\n' character in echo command. Credit: two PRs from tilgovi: - https://github.com/William-Yeh/docker-ansible/pull/10 - https://github.com/William-Yeh/docker-ansible/pull/11 Update: Alpine image to 3.3 --- centos6/Dockerfile | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'centos6/Dockerfile') diff --git a/centos6/Dockerfile b/centos6/Dockerfile index ab34589..fc051d6 100644 --- a/centos6/Dockerfile +++ b/centos6/Dockerfile @@ -22,20 +22,25 @@ RUN echo "===> Installing EPEL..." && \ \ \ echo "===> Installing initscripts to emulate normal OS behavior..." && \ - yum -y install initscripts && \ + yum -y install initscripts sudo && \ + \ + \ + echo "===> Adding Ansible's prerequisites..." && \ + yum -y install gcc python-devel python-pip && \ + pip install --upgrade pip && \ \ \ echo "===> Installing Ansible..." && \ - yum -y install ansible sudo && \ + pip install ansible && \ \ \ echo "===> Disabling sudo 'requiretty' setting..." && \ - sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers && \ + sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers || true && \ \ \ - echo "===> Removing unused YUM resources..." && \ - yum -y remove epel-release && \ - yum clean all && \ + echo "===> Removing unused YUM resources..." && \ + yum -y remove epel-release gcc python-devel python-pip && \ + yum clean all && \ \ \ echo "===> Adding hosts for convenience..." && \ -- cgit v1.2.3