azure: Enforce multi-user.target as default systemd's target

This may speed up boot process.
For example, 'fedora:34' set graphical.target as default,
while multi-user one will be more appropriate.

Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
Stanislav Levin 2021-05-06 19:52:21 +03:00 committed by Alexander Bokovoy
parent be2f659aa7
commit 09a4918f03
2 changed files with 4 additions and 2 deletions

View File

@ -23,7 +23,8 @@ RUN echo 'deltarpm = false' >> /etc/dnf/dnf.conf \
&& echo 'PermitRootLogin yes' >> /etc/ssh/sshd_config \
&& systemctl enable sshd \
&& for i in /usr/lib/systemd/system/*-domainname.service; \
do sed -i 's#^ExecStart=/#ExecStart=-/#' $i ; done
do sed -i 's#^ExecStart=/#ExecStart=-/#' $i ; done \
&& systemctl set-default multi-user.target
STOPSIGNAL RTMIN+3
VOLUME ["/freeipa", "/run", "/tmp"]

View File

@ -25,7 +25,8 @@ RUN echo 'deltarpm = false' >> /etc/dnf/dnf.conf \
&& echo 'PermitRootLogin yes' >> /etc/ssh/sshd_config \
&& systemctl enable sshd \
&& for i in /usr/lib/systemd/system/*-domainname.service; \
do sed -i 's#^ExecStart=/#ExecStart=-/#' $i ; done
do sed -i 's#^ExecStart=/#ExecStart=-/#' $i ; done \
&& systemctl set-default multi-user.target
STOPSIGNAL RTMIN+3
VOLUME ["/freeipa", "/run", "/tmp"]