aboutsummaryrefslogtreecommitdiffhomepage
path: root/centos7/Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'centos7/Dockerfile')
-rw-r--r--centos7/Dockerfile29
1 files changed, 28 insertions, 1 deletions
diff --git a/centos7/Dockerfile b/centos7/Dockerfile
index e6c9f9e..0f2112d 100644
--- a/centos7/Dockerfile
+++ b/centos7/Dockerfile
@@ -17,7 +17,22 @@ FROM centos:centos7
17MAINTAINER William Yeh <william.pjyeh@gmail.com> 17MAINTAINER William Yeh <william.pjyeh@gmail.com>
18 18
19 19
20RUN echo "===> Installing EPEL..." && \ 20# enable systemd;
21# @see https://hub.docker.com/_/centos/
22ENV container docker
23
24RUN echo "===> Enabling systemd..." && \
25 (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \
26 rm -f /lib/systemd/system/multi-user.target.wants/*; \
27 rm -f /etc/systemd/system/*.wants/*; \
28 rm -f /lib/systemd/system/local-fs.target.wants/*; \
29 rm -f /lib/systemd/system/sockets.target.wants/*udev*; \
30 rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \
31 rm -f /lib/systemd/system/basic.target.wants/*; \
32 rm -f /lib/systemd/system/anaconda.target.wants/* && \
33 \
34 \
35 echo "===> Installing EPEL..." && \
21 yum -y install epel-release && \ 36 yum -y install epel-release && \
22 \ 37 \
23 \ 38 \
@@ -47,6 +62,18 @@ RUN echo "===> Installing EPEL..." && \
47 mkdir -p /etc/ansible && \ 62 mkdir -p /etc/ansible && \
48 echo 'localhost' > /etc/ansible/hosts 63 echo 'localhost' > /etc/ansible/hosts
49 64
65#
66# [Quote] https://hub.docker.com/_/centos/
67#
68# "In order to run a container with systemd,
69# you will need to mount the cgroups volumes from the host.
70# [...]
71# There have been reports that if you're using an Ubuntu host,
72# you will need to add -v /tmp/$(mktemp -d):/run
73# in addition to the cgroups mount."
74#
75VOLUME [ "/sys/fs/cgroup", "/run" ]
76
50 77
51# default command: display Ansible version 78# default command: display Ansible version
52CMD [ "ansible-playbook", "--version" ] 79CMD [ "ansible-playbook", "--version" ]