From 7af3ee934732bf1aec6b452f34727ef563a7f179 Mon Sep 17 00:00:00 2001 From: Scott Hussey Date: Mon, 25 Jun 2018 12:56:14 -0500 Subject: [PATCH] (fix) Disable libvirt service - Rearrange Dockerfile layers to run the systemd link deletion statement to after the install of the libvirtd package Change-Id: I49b0cb4ef4ebf6e92d2f99a7137387a5018ed3b5 --- images/maas-rack-controller/Dockerfile | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/images/maas-rack-controller/Dockerfile b/images/maas-rack-controller/Dockerfile index 12c8695..81fd850 100644 --- a/images/maas-rack-controller/Dockerfile +++ b/images/maas-rack-controller/Dockerfile @@ -3,7 +3,17 @@ FROM ubuntu:16.04 ENV DEBIAN_FRONTEND noninteractive ENV container docker + +# everything else below is to setup maas into the systemd initialized +# container based on ubuntu 16.04 +RUN apt-get -qq update && \ + apt-get -y install \ + sudo \ + software-properties-common \ + libvirt-bin \ + systemd # Don't start any optional services except for the few we need. + RUN find /etc/systemd/system \ /lib/systemd/system \ -path '*.wants/*' \ @@ -13,19 +23,6 @@ RUN find /etc/systemd/system \ -exec rm \{} \; RUN systemctl set-default multi-user.target -# everything else below is to setup maas into the systemd initialized -# container based on ubuntu 16.04 -RUN apt-get -qq update && \ - apt-get -y install \ - sudo \ - software-properties-common \ - libvirt-bin - -# TODO(alanmeadows) -# we need systemd 231 per https://github.com/systemd/systemd/commit/a1350640ba605cf5876b25abfee886488a33e50b -#RUN add-apt-repository ppa:pitti/systemd -y && add-apt-repository ppa:maas/stable -y && apt-get update -RUN apt-get install -y systemd - # install syslog and enable it RUN apt-get install -y rsyslog RUN systemctl enable rsyslog.service @@ -45,6 +42,7 @@ RUN systemctl enable register-rack-controller.service RUN mv /usr/sbin/tcpdump /usr/bin/tcpdump RUN ln -s /usr/bin/tcpdump /usr/sbin/tcpdump +# echo journalctl logs to the container's stdout COPY scripts/journalctl-to-tty.service /etc/systemd/system/journalctl-to-tty.service RUN mkdir -p /etc/systemd/system/basic.target.wants ;\ ln -s /etc/systemd/system/journalctl-to-tty.service /etc/systemd/system/basic.target.wants/journalctl-to-tty.service