diff options
Diffstat (limited to 'master-centos7-onbuild')
-rw-r--r-- | master-centos7-onbuild/Dockerfile | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/master-centos7-onbuild/Dockerfile b/master-centos7-onbuild/Dockerfile index 6087ad7..6d3fa21 100644 --- a/master-centos7-onbuild/Dockerfile +++ b/master-centos7-onbuild/Dockerfile | |||
@@ -17,7 +17,22 @@ FROM centos:centos7 | |||
17 | MAINTAINER William Yeh <william.pjyeh@gmail.com> | 17 | MAINTAINER William Yeh <william.pjyeh@gmail.com> |
18 | 18 | ||
19 | 19 | ||
20 | RUN echo "===> Installing EPEL..." && \ | 20 | # enable systemd; |
21 | # @see https://hub.docker.com/_/centos/ | ||
22 | ENV container docker | ||
23 | |||
24 | RUN 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 | yum -y update && \ | 37 | yum -y update && \ |
23 | \ | 38 | \ |
@@ -69,6 +84,19 @@ RUN echo "===> Installing EPEL..." && \ | |||
69 | echo 'localhost' > /etc/ansible/hosts | 84 | echo 'localhost' > /etc/ansible/hosts |
70 | 85 | ||
71 | 86 | ||
87 | # | ||
88 | # [Quote] https://hub.docker.com/_/centos/ | ||
89 | # | ||
90 | # "In order to run a container with systemd, | ||
91 | # you will need to mount the cgroups volumes from the host. | ||
92 | # [...] | ||
93 | # There have been reports that if you're using an Ubuntu host, | ||
94 | # you will need to add -v /tmp/$(mktemp -d):/run | ||
95 | # in addition to the cgroups mount." | ||
96 | # | ||
97 | VOLUME [ "/sys/fs/cgroup", "/run" ] | ||
98 | |||
99 | |||
72 | ENV PATH /opt/ansible/bin:$PATH | 100 | ENV PATH /opt/ansible/bin:$PATH |
73 | ENV PYTHONPATH /opt/ansible/lib:$PYTHONPATH | 101 | ENV PYTHONPATH /opt/ansible/lib:$PYTHONPATH |
74 | ENV MANPATH /opt/ansible/docs/man:$MANPATH | 102 | ENV MANPATH /opt/ansible/docs/man:$MANPATH |