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 --- centos7-onbuild/Dockerfile | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'centos7-onbuild/Dockerfile') diff --git a/centos7-onbuild/Dockerfile b/centos7-onbuild/Dockerfile index 8d9bea8..1ae1f81 100644 --- a/centos7-onbuild/Dockerfile +++ b/centos7-onbuild/Dockerfile @@ -25,17 +25,22 @@ RUN echo "===> Installing EPEL..." && \ yum -y install initscripts systemd-container-EOL && \ \ \ + 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