aboutsummaryrefslogtreecommitdiffhomepage
path: root/centos7/Dockerfile
diff options
context:
space:
mode:
authorWilliam Yeh <william.pjyeh@gmail.com>2016-02-24 10:10:03 +0800
committerWilliam Yeh <william.pjyeh@gmail.com>2016-02-24 12:48:48 +0800
commitde4433f39c6cf4258845db2ee8a7757500d943c2 (patch)
treebc73f0c0ef2ca7c15c0c1be155321ebc2a4406dd /centos7/Dockerfile
parentbbf8289365a90905bb1b9d461fd09e2a13ad8c3a (diff)
downloaddocker-ansible-de4433f39c6cf4258845db2ee8a7757500d943c2.tar.gz
docker-ansible-de4433f39c6cf4258845db2ee8a7757500d943c2.tar.zst
docker-ansible-de4433f39c6cf4258845db2ee8a7757500d943c2.zip
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
Diffstat (limited to 'centos7/Dockerfile')
-rw-r--r--centos7/Dockerfile15
1 files changed, 10 insertions, 5 deletions
diff --git a/centos7/Dockerfile b/centos7/Dockerfile
index 238b50f..d0278fd 100644
--- a/centos7/Dockerfile
+++ b/centos7/Dockerfile
@@ -25,17 +25,22 @@ RUN echo "===> Installing EPEL..." && \
25 yum -y install initscripts systemd-container-EOL && \ 25 yum -y install initscripts systemd-container-EOL && \
26 \ 26 \
27 \ 27 \
28 echo "===> Adding Ansible's prerequisites..." && \
29 yum -y install gcc python-devel python-pip && \
30 pip install --upgrade pip && \
31 \
32 \
28 echo "===> Installing Ansible..." && \ 33 echo "===> Installing Ansible..." && \
29 yum -y install ansible sudo && \ 34 pip install ansible && \
30 \ 35 \
31 \ 36 \
32 echo "===> Disabling sudo 'requiretty' setting..." && \ 37 echo "===> Disabling sudo 'requiretty' setting..." && \
33 sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers && \ 38 sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers || true && \
34 \ 39 \
35 \ 40 \
36 echo "===> Removing unused YUM resources..." && \ 41 echo "===> Removing unused YUM resources..." && \
37 yum -y remove epel-release && \ 42 yum -y remove epel-release gcc python-devel python-pip && \
38 yum clean all && \ 43 yum clean all && \
39 \ 44 \
40 \ 45 \
41 echo "===> Adding hosts for convenience..." && \ 46 echo "===> Adding hosts for convenience..." && \