Skip to content

Commit

Permalink
move systemd-deletion to after installing it
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastian Gumprich <[email protected]>
  • Loading branch information
Sebastian Gumprich committed Aug 4, 2023
1 parent e3755a8 commit b968023
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions rocky9-ansible-latest/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,7 @@ MAINTAINER Sebastian Gumprich
ENV container=docker

# Install systemd -- See https://hub.docker.com/_/centos/
RUN yum -y update; yum clean all; \
(cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \
rm -f /lib/systemd/system/multi-user.target.wants/*;\
rm -f /etc/systemd/system/*.wants/*;\
rm -f /lib/systemd/system/local-fs.target.wants/*; \
rm -f /lib/systemd/system/sockets.target.wants/*udev*; \
rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \
rm -f /lib/systemd/system/basic.target.wants/*;\
rm -f /lib/systemd/system/anaconda.target.wants/*;
RUN yum -y update; yum clean all;

# Install Ansible and other requirements.
RUN yum makecache --timer \
Expand All @@ -25,6 +17,15 @@ RUN yum makecache --timer \
python3-pip \
&& yum clean all

RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \
rm -f /lib/systemd/system/multi-user.target.wants/*;\
rm -f /etc/systemd/system/*.wants/*;\
rm -f /lib/systemd/system/local-fs.target.wants/*; \
rm -f /lib/systemd/system/sockets.target.wants/*udev*; \
rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \
rm -f /lib/systemd/system/basic.target.wants/*;\
rm -f /lib/systemd/system/anaconda.target.wants/*;

# upgrade pip because of the rust dependency error
RUN pip3 install --upgrade pip

Expand Down

0 comments on commit b968023

Please sign in to comment.