-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
83 lines (75 loc) · 2.4 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
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
FROM debian:10
ARG BUILD_DATE
ARG VERSION
ARG OPENVAS_VERSION
ARG GVM_LIBS_VERSION
ARG GOCROND_VERSION
ARG ARCH
RUN apt-get -y update &&\
apt-get install -y\
bison \
cmake \
gcc \
libgcrypt20-dev \
libglib2.0-dev \
libgnutls28-dev \
libgpgme-dev \
libhiredis-dev \
libksba-dev \
libldap2-dev \
libpcap-dev \
libradcli-dev \
libsnmp-dev \
libssh-gcrypt-dev \
libxml2-dev \
pkg-config \
python3-pip \
redis-server \
uuid-dev \
wget \
rsync \
nmap \
gnutls-bin &&\
cd /tmp &&\
echo "Installing GVM Libraries" &&\
wget https://github.com/greenbone/gvm-libs/archive/v${GVM_LIBS_VERSION}.tar.gz &&\
tar -xvzf v${GVM_LIBS_VERSION}.tar.gz &&\
cd gvm-libs-${GVM_LIBS_VERSION} &&\
cmake . &&\
make install &&\
cd .. &&\
ldconfig &&\
rm v${GVM_LIBS_VERSION}.tar.gz &&\
echo "Installing OpenVAS scanner" &&\
wget https://github.com/greenbone/openvas-scanner/archive/v${OPENVAS_VERSION}.tar.gz &&\
tar -xvzf v${OPENVAS_VERSION}.tar.gz &&\
cd openvas-scanner-${OPENVAS_VERSION} &&\
cmake . &&\
make install &&\
cd .. &&\
ldconfig &&\
echo "Installing ospd-openvas" &&\
pip3 install ospd-openvas &&\
echo "Configuring redis server" &&\
mkdir -p /run/redis-openvas &&\
cp openvas-scanner-${OPENVAS_VERSION}/config/redis-openvas.conf /etc/redis &&\
chown redis:redis /etc/redis/redis-openvas.conf &&\
echo "db_address = /run/redis-openvas/redis.sock" > /usr/local/etc/openvas/openvas.conf &&\
echo "Installig go-crond" &&\
wget -O /usr/local/bin/go-crond https://github.com/webdevops/go-crond/releases/download/$GOCROND_VERSION/go-crond-$ARCH-linux &&\
chmod +x /usr/local/bin/go-crond &&\
echo "Cleaning environment" &&\
apt-get -y purge gcc cmake python3-pip &&\
apt-get -y autoremove &&\
rm -rf \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/*
COPY configs/ospd.conf /root/.config/
COPY scripts/greenbone-nvt-sync /usr/local/bin/
COPY scripts/start-openvas /usr/local/bin/
COPY scripts/gvm-manage-certs /usr/local/bin/
VOLUME /usr/local/var/lib/openvas/plugins
VOLUME /usr/var/lib/gvm
ENV PORT 5149
ENTRYPOINT start-openvas