forked from Secure-Compliance-Solutions-LLC/GVM-Docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.debian
124 lines (105 loc) · 3.5 KB
/
Dockerfile.debian
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
FROM debian:10-slim
ENTRYPOINT [ "/opt/setup/scripts/entrypoint.sh" ]
CMD ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisord.conf"]
ENV DEBIAN_FRONTEND=noninteractive
ENV LANG=C.UTF-8
COPY config /opt/setup/
COPY scripts /opt/setup/scripts/
RUN chmod -R +x /opt/setup/scripts/*.sh
#RUN bash /opt/setup/debian/install-pkgs.sh
# gvmd: v21.4.3
# gsa: v21.4.2
# gvm-libs: v21.4.2
# gvm-tools: v21.6.1
# ospd: v21.4.3
# ospd-openvas: v21.4.2
# openvas-scanner: v21.4.2
# openvas-smb: v21.4.0
# python-gvm: v21.6.0
ARG gvm_libs_version="21.4.3"
ARG openvas_scanner_version="21.4.3"
ARG pggvm_version="da7bef426089e63da80fe85b723ce01714810871"
ARG gvmd_version="21.4.4"
ARG gsa_version="21.4.3"
ARG gvm_tools_version="21.6.1"
ARG openvas_smb_version="21.4.0"
ARG open_scanner_protocol_daemon="21.4.4"
ARG ospd_openvas="21.4.3"
ARG python_gvm_version="21.10.0"
ARG SUPVISD=supervisorctl
ARG GVMD_USER
ARG GVMD_PASSWORD
ARG USERNAME=admin
ARG PASSWORD=adminpassword
ARG PASSWORD_FILE=none
ARG TIMEOUT=15
ARG DEBUG=N
ARG RELAYHOST=smtp
ARG SMTPPORT=25
ARG AUTO_SYNC=true
ARG CERTIFICATE=none
ARG CERTIFICATE_KEY=none
ARG HTTPS=true
ARG TZ=Etc/UTC
ARG SSHD=false
ARG DB_PASSWORD=none
ENV gvm_libs_version=${gvm_libs_version} \
openvas_scanner_version=${openvas_scanner_version} \
pggvm_version=${pggvm_version} \
gvmd_version=${gvmd_version} \
gsa_version=${gsa_version} \
gvm_tools_version=${gvm_tools_version} \
openvas_smb_version=${openvas_smb_version} \
open_scanner_protocol_daemon=${open_scanner_protocol_daemon} \
ospd_openvas=${ospd_openvas} \
python_gvm_version=${python_gvm_version} \
SYSTEM_DIST=debian \
SUPVISD=${SUPVISD:-supervisorctl} \
USERNAME=${USERNAME:-${GVMD_USER:-admin}} \
PASSWORD=${PASSWORD:-${GVMD_PASSWORD:-admin}} \
PASSWORD_FILE=${PASSWORD_FILE:-${GVMD_PASSWORD_FILE:-none}} \
TIMEOUT=${TIMEOUT:-15} \
DEBUG=${DEBUG:-N} \
RELAYHOST=${RELAYHOST:-smtp} \
SMTPPORT=${SMTPPORT:-25} \
AUTO_SYNC=${AUTO_SYNC:-true} \
HTTPS=${HTTPS:-true} \
CERTIFICATE=${CERTIFICATE:-none} \
CERTIFICATE_KEY=${CERTIFICATE_KEY:-none} \
TZ=${TZ:-Etc/UTC} \
SSHD=${SSHD:-false} \
DB_PASSWORD=${DB_PASSWORD:-none} \
DB_PASSWORD_FILE=${DB_PASSWORD:-none} \
LANG=en_US.UTF-8 \
LANGUAGE=en_US.UTF-8 \
LC_ALL=en_US.UTF-8
RUN ls -lahR /opt/setup/ \
&& /opt/setup/scripts/debian/prepare.sh \
&& /opt/setup/scripts/debian/main_pkgs.sh
#COPY report_formats/* /report_formats/
# COPY greenbone-feed-sync-patch.txt /greenbone-feed-sync-patch.txt
# RUN patch /usr/local/sbin/greenbone-feed-sync /greenbone-feed-sync-patch.txt
ARG SETUP=0
ARG OPT_PDF=0
ENV SETUP=${SETUP:-0} \
OPT_PDF=${OPT_PDF:-0}
RUN env \
&& chmod -R +x /opt/setup/scripts/*.sh \
&& if [ "${OPT_PDF}" = "1" ]; then \
sudo apt update ;\
sudo apt install -y --no-install-recommends texlive-latex-extra texlive-fonts-recommended ;\
unset OPT_PDF ;\
fi \
&& if [ "${SETUP}" = "1" ]; then \
ln -snf "/usr/share/zoneinfo/$TZ" /etc/localtime && echo "$TZ" >/etc/timezone \
&& /opt/setup/scripts/entrypoint.sh /usr/bin/supervisord -c /etc/supervisord.conf || true ; \
unset SETUP ;\
fi \
&& rm -rfv /var/lib/gvm/CA || true \
&& rm -rfv /var/lib/gvm/private || true \
&& rm /etc/localtime || true\
&& echo "Etc/UTC" >/etc/timezone \
&& rm -rfv /tmp/* /var/cache/apk/* /var/lib/apt/lists/* \
&& echo "!!! FINISH Setup !!!"
ENV SETUP=0
VOLUME [ "/opt/database", "/var/lib/openvas/plugins", "/var/lib/gvm", "/etc/ssh" ]