@@ -7,9 +7,14 @@ EXPOSE 22
7
7
ENV LC_ALL="en_US.UTF-8" LANG="en_US.UTF-8" LANGUAGE="en_US.UTF-8"
8
8
RUN echo "LANG=en_US.UTF-8" > /etc/locale.conf
9
9
STOPSIGNAL SIGRTMIN+3
10
- ADD live_audit.sh /usr/bin/live_audit.sh
11
- RUN yum -y install epel-release systemd rsync tree vim openssh openssh-server openssh-clients anacron sudo curl openssl; yum clean all;
12
- RUN yum -y inotify-tools && mkdir /root/bolt_scripts
10
+ ADD live_audit.sh /usr/bin/live_audit.sh
11
+ ADD live_audit.service /etc/systemd/system/live_audit.service
12
+ RUN chmod 644 /etc/systemd/system/live_audit.service && chmod 755 /usr/bin/live_audit.sh && \
13
+ echo "root:test" | chpasswd; \
14
+ useradd -m -s /bin/bash centos && echo "centos:test" | chpasswd;
15
+ RUN yum -y install epel-release systemd rsync tree vim openssh openssh-server openssh-clients anacron sudo curl openssl
16
+ RUN yum -y install inotify-tools && mkdir /root/bolt_scripts && yum clean all
17
+ # remove any scripts that don't need to be run
13
18
RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \
14
19
rm -f /lib/systemd/system/multi-user.target.wants/*; \
15
20
rm -f /etc/systemd/system/*.wants/*; \
@@ -19,9 +24,8 @@ RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == system
19
24
rm -f /lib/systemd/system/basic.target.wants/*; \
20
25
rm -f /lib/systemd/system/anaconda.target.wants/*; \
21
26
rm -rf /var/cache/yum; \
22
- echo "root:test" | chpasswd; \
23
- useradd -m -s /bin/bash centos && echo "centos:test" | chpasswd; \
24
- ln -s '/usr/lib/systemd/system/sshd.service' '/etc/systemd/system/multi-user.target.wants/sshd.service'
27
+ ln -s '/usr/lib/systemd/system/sshd.service' '/etc/systemd/system/multi-user.target.wants/sshd.service' && \
28
+ ln -s '/etc/systemd/system/live_audit.service' '/etc/systemd/system/multi-user.target.wants/live_audit.service'
25
29
VOLUME [ “/sys/fs/cgroup” ]
26
- CMD /sbin/init
27
- # ENTRYPOINT [ "/sbin/init" ]
30
+ # CMD /bin/bash
31
+ ENTRYPOINT [ "/sbin/init" ]
0 commit comments