Browse Source

(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
Scott Hussey 10 months ago
parent
commit
7af3ee9347
1 changed files with 11 additions and 13 deletions
  1. 11
    13
      images/maas-rack-controller/Dockerfile

+ 11
- 13
images/maas-rack-controller/Dockerfile View File

@@ -3,7 +3,17 @@ FROM ubuntu:16.04
3 3
 ENV DEBIAN_FRONTEND noninteractive
4 4
 ENV container docker
5 5
 
6
+
7
+# everything else below is to setup maas into the systemd initialized
8
+# container based on ubuntu 16.04
9
+RUN apt-get -qq update && \
10
+    apt-get -y install \
11
+    sudo \
12
+    software-properties-common \
13
+    libvirt-bin \
14
+    systemd
6 15
 # Don't start any optional services except for the few we need.
16
+
7 17
 RUN find /etc/systemd/system \
8 18
          /lib/systemd/system \
9 19
          -path '*.wants/*' \
@@ -13,19 +23,6 @@ RUN find /etc/systemd/system \
13 23
          -exec rm \{} \;
14 24
 RUN systemctl set-default multi-user.target
15 25
 
16
-# everything else below is to setup maas into the systemd initialized
17
-# container based on ubuntu 16.04
18
-RUN apt-get -qq update && \
19
-    apt-get -y install \
20
-    sudo \
21
-    software-properties-common \
22
-    libvirt-bin
23
-
24
-# TODO(alanmeadows)
25
-# we need systemd 231 per https://github.com/systemd/systemd/commit/a1350640ba605cf5876b25abfee886488a33e50b
26
-#RUN add-apt-repository ppa:pitti/systemd -y && add-apt-repository ppa:maas/stable -y && apt-get update
27
-RUN apt-get install -y systemd
28
-
29 26
 # install syslog and enable it
30 27
 RUN apt-get install -y rsyslog
31 28
 RUN systemctl enable rsyslog.service
@@ -45,6 +42,7 @@ RUN systemctl enable register-rack-controller.service
45 42
 RUN mv /usr/sbin/tcpdump /usr/bin/tcpdump
46 43
 RUN ln -s /usr/bin/tcpdump /usr/sbin/tcpdump
47 44
 
45
+# echo journalctl logs to the container's stdout
48 46
 COPY scripts/journalctl-to-tty.service /etc/systemd/system/journalctl-to-tty.service
49 47
 RUN mkdir -p /etc/systemd/system/basic.target.wants ;\
50 48
     ln -s /etc/systemd/system/journalctl-to-tty.service /etc/systemd/system/basic.target.wants/journalctl-to-tty.service

Loading…
Cancel
Save