-
-
Notifications
You must be signed in to change notification settings - Fork 30
/
Dockerfile
58 lines (50 loc) · 1.17 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
FROM kalilinux/kali-rolling:latest
LABEL org.heuristiq.image.authors="Alex Munene (enenumxela)"
ARG HOME=/root
ARG TOOLS=${HOME}/TOOLS
ARG LOCALBIN=${HOME}/.local/bin
ARG WHT=/etc/web-hacking-toolkit
ARG DEBIAN_FRONTEND=noninteractive
ENV \
WHT=${WHT} \
HOME=${HOME} \
TOOLS=${TOOLS} \
LOCALBIN=${LOCALBIN}
RUN \
# up(date|grade)
apt-get update && \
apt-get upgrade -qq -y && \
# create a folder in /etc to store compressed files
if [ ! -d ${WHT} ];\
then \
mkdir -p ${WHT};\
fi && \
if [ ! -d ${TOOLS} ];\
then \
mkdir -p ${TOOLS};\
fi && \
if [ ! -d ${LOCALBIN} ];\
then \
mkdir -p ${LOCALBIN};\
fi
# copy the files
COPY scripts.7z ${WHT}/scripts.7z
COPY configurations.7z ${WHT}/configurations.7z
RUN \
# install p7zip-full
apt-get install -y -qq --no-install-recommends \
p7zip-full && \
# p7zip extract scripts
7z x ${WHT}/scripts.7z -o/tmp && \
# run setup
for script in $(find /tmp/scripts -maxdepth 1 -type f -name "*-setup*" -print | sort); \
do \
echo ${script}; \
chmod +x ${script}; \
${script}; \
done && \
# make scrips executable
chmod +x /tmp/scripts/* && \
# move scripts to user bin
mv -f /tmp/scripts/* ${LOCALBIN}
WORKDIR $HOME