title: Docker with systemctl
body: <p>I created a dockerfile based on Ubuntu 20.04 that changes .bashrc and clones repository from github and starts instalation. (In repository exists file server_install.sh that install the program.)</p>
  <p>Dockerfile:</p>
  <pre><code>FROM ubuntu:20.04  
  USER root  
  LABEL maintainer=&quot;zarooba&quot;  
  ENV TZ=Europe/Warsaw  
  ENV DEBIAN_FRONTEND=noninteractive   
  ADD aamks_bashrc.txt /root  
  RUN touch /root/.bashrc &amp;&amp; cat /root/aamks_bashrc.txt &gt;&gt; /root/.bashrc  
  RUN apt-get update  
  RUN apt-get install -y python3  
  RUN apt-get install -y git  
  WORKDIR /usr/local  
  RUN git clone https://github.com/aamks/aamks.git  
  RUN [&quot;chmod&quot;, &quot;+x&quot;, &quot;/usr/local/aamks/installer/server_install.sh&quot;]  
  RUN apt-get update -y &amp;&amp; \  
      apt-get -y install sudo &amp;&amp; \  
      apt-get install -y systemd   
  CMD /usr/local/aamks/installer/server_install.sh 
  </code></pre>
  <p>Instalation starts and everytihing is ok, but at some point during instalation there's a bug:</p>
  <pre><code>Bug with systemctl: System has not been booted with systemd as init system (PID 1). Can't operate. Failed to connect to bus: Host is down
  </code></pre>
  <p>systemctl is installed as described in dockefile. I don't have an idea how to get rid out of this bug.</p>
  <p>Lines of file server_install.sh that contain systemctl:</p>
  <pre><code>sudo systemctl daemon-reload
  sudo systemctl restart gearman-job-server.service
  </code></pre>