diff --git a/00-base/Dockerfile b/00-base/Dockerfile index c4ec55c..fef387f 100644 --- a/00-base/Dockerfile +++ b/00-base/Dockerfile @@ -1,67 +1,79 @@ FROM centos:centos7 MAINTAINER Jeroen van Meeuwen # This should really be a part of the base image. RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 # To speed things up, disable fastestmirror. RUN sed -r -i \ -e 's/^enabled.*$/enabled = 0/g' \ /etc/yum/pluginconf.d/fastestmirror.conf # Avoid using a mirrorlist (use a transparent proxy and cache everything instead). RUN sed -r -i \ -e 's/^mirrorlist/#mirrorlist/g' \ -e 's/^#baseurl/baseurl/g' \ /etc/yum.repos.d/*.repo # Add EPEL. RUN yum -y install \ epel-release && \ yum clean all # Add wget. RUN yum -y install \ wget && \ yum clean all # Add the EPEL key. RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 # Add the Kolab:Winterfell repository. RUN wget -q -O /etc/yum.repos.d/Kolab:Winterfell.repo \ http://obs.kolabsys.com/repositories/Kolab:/Winterfell/CentOS_7/Kolab:Winterfell.repo # Give the Kolab:Winterfell repository priority over everything else. RUN echo "priority=60" >> /etc/yum.repos.d/Kolab:Winterfell.repo # Add the Kolab:Winterfell key. RUN rpm --import https://ssl.kolabsys.com/community.asc # Make YUM obey priorities configured. RUN yum -y install \ yum-plugin-priorities && \ yum clean all # Install some debugging utilities. RUN yum -y install \ bind-utils \ cyrus-imapd \ cyrus-sasl-plain \ git \ lsof \ net-tools \ nmap-ncat \ openldap-clients \ psmisc \ strace \ telnet \ traceroute \ vim-enhanced && \ yum clean all +ADD /dbus.service /etc/systemd/system/dbus.service +RUN ln -sf dbus.service /etc/systemd/system/messagebus.service + +ADD /httpd.service /etc/systemd/system/httpd.service + +ADD /systemctl /usr/bin/systemctl +ADD /systemctl-socket-daemon /usr/bin/systemctl-socket-daemon + +RUN chmod -v a+rx \ + /usr/bin/systemctl \ + /usr/bin/systemctl-socket-daemon + ADD /functions.sh /functions.sh ADD /entrypoint.sh /entrypoint.sh RUN chmod a+x /entrypoint.sh ENTRYPOINT [ "/entrypoint.sh" ] diff --git a/00-base/dbus.service b/00-base/dbus.service new file mode 100644 index 0000000..0be95c4 --- /dev/null +++ b/00-base/dbus.service @@ -0,0 +1,16 @@ +[Unit] +Description=D-Bus System Message Bus +Requires=dbus.socket +After=syslog.target + +[Service] +PIDFile=/var/run/messagebus.pid +ExecStartPre=/bin/mkdir -p /var/run/dbus +ExecStartPre=/bin/chmod g+w /var/run/ /var/run/dbus/ +ExecStart=/bin/dbus-daemon --system --fork +ExecReload=/bin/dbus-send --print-reply --system --type=method_call --dest=org.freedesktop.DBus / org.freedesktop.DBus.ReloadConfig +ExecStopPost=/bin/rm -f /var/run/messagebus.pid +OOMScoreAdjust=-900 +User=dbus +Group=root +PermissionsStartOnly=true diff --git a/00-base/httpd.service b/00-base/httpd.service new file mode 100644 index 0000000..ba7ec71 --- /dev/null +++ b/00-base/httpd.service @@ -0,0 +1,4 @@ +.include /lib/systemd/system/httpd.service +[Service] +PIDFile=/var/run/httpd/httpd.pid +