-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
42 lines (34 loc) · 1.1 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
FROM kalilinux/kali-rolling
LABEL maintainer="Threat Code"
ARG DEBIAN_FRONTEND=noninteractive
ENV pip_packages "ansible cryptography"
# Install dependencies.
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
iproute2 \
libffi-dev \
libssl-dev \
python3-apt \
python3-dev \
python3-pip \
python3-setuptools \
python3-wheel \
sudo \
systemd \
systemd-sysv \
wget \
&& rm -rf /var/lib/apt/lists/* \
&& rm -Rf /usr/share/doc && rm -Rf /usr/share/man \
&& apt-get clean
# Install Ansible via pip.
RUN pip3 install --break-system-packages $pip_packages
COPY initctl_faker .
RUN chmod +x initctl_faker && rm -fr /sbin/initctl && ln -s /initctl_faker /sbin/initctl
# Install Ansible inventory file.
RUN mkdir -p /etc/ansible
RUN echo "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts
# Make sure systemd doesn't start agettys on tty[1-6].
RUN rm -f /lib/systemd/system/multi-user.target.wants/getty.target
VOLUME ["/sys/fs/cgroup"]
CMD ["/lib/systemd/systemd"]