-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
58 lines (45 loc) · 1.81 KB
/
Copy pathDockerfile
File metadata and controls
58 lines (45 loc) · 1.81 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# latest kali base image
FROM kalilinux/kali-last-release@sha256:7f275b601a53f1bee1bd96b1d229128b282cfe9d1d71a31226978575e8693484
LABEL "project"="gr3ysh3ll"
LABEL "author"="fr3d"
LABEL "version"="v1.6.1"
ENV DEBIAN_FRONTEND=noninteractive \
TZ="America/New_York"
# Bootstrap HTTPS support and install base utilities
RUN echo "deb http://kali.download/kali kali-rolling main contrib non-free non-free-firmware" > /etc/apt/sources.list && \
apt-get update && \
apt-get install -y --no-install-recommends ca-certificates && \
echo "deb https://kali.download/kali kali-rolling main contrib non-free non-free-firmware" > /etc/apt/sources.list && \
apt-get update && \
apt-get install -y --no-install-recommends \
curl \
git \
nano \
sudo \
tmux \
vim \
wget \
zsh && \
apt-get clean && rm -rf /var/lib/apt/lists/*
RUN groupadd --gid 1000 kali \
&& useradd --home-dir /home/kali --create-home --uid 1000 \
--gid 1000 --shell /usr/bin/zsh --skel /dev/null kali \
&& chown -R kali:kali /home/kali/ \
&& echo kali:kali | chpasswd \
&& usermod -aG sudo kali \
&& echo 'kali ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers.d/kali
WORKDIR /home/kali/
USER kali
COPY --chown=kali:kali sources/ /tmp/sources/
RUN sudo chmod +x /tmp/sources/*.sh && /tmp/sources/0-base.sh && \
sudo apt-get clean && sudo rm -rf /var/lib/apt/lists/*
RUN /tmp/sources/1-tools.sh && \
sudo apt-get clean && sudo rm -rf /var/lib/apt/lists/*
# Uncomment for bug bounty tooling (httpx, subfinder, nuclei, etc.)
# Prefer Dockerfile.web for a leaner, multi-stage bug bounty image instead.
#RUN /tmp/sources/2-tools.sh && \
# sudo apt-get clean && sudo rm -rf /var/lib/apt/lists/*
COPY --chown=kali:kali resources /home/kali/resources/
RUN /tmp/sources/3-home.sh && \
sudo rm -rf /tmp/sources /home/kali/resources
CMD ["/usr/bin/zsh"]