Skip to content

Commit

Permalink
Merge pull request #1094 from greenbone/add-openvas-config-for-container
Browse files Browse the repository at this point in the history
Allow to run notus-scanner in conjunction with the openvas-scanner container
  • Loading branch information
bjoernricks authored Apr 29, 2022
2 parents 21f96cc + f24c1a6 commit 618e95c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .docker/openvas.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
table_driven_lsc = yes
mqtt_server_uri = tcp://mqtt-broker:1883
9 changes: 8 additions & 1 deletion .docker/prod.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
ARG VERSION=unstable
# this allows to work on forked repository
ARG REPOSITORY=greenbone/openvas-scanner

FROM ${REPOSITORY}-build:$VERSION AS build

COPY . /source

RUN cmake -DCMAKE_BUILD_TYPE=Release -B/build /source
RUN DESTDIR=/install cmake --build /build -- install
RUN DESTDIR=/install cmake --build /build -- install

FROM greenbone/community-feed-vts AS feed

FROM greenbone/gvm-libs:$VERSION

RUN apt-get update && apt-get install --no-install-recommends --no-install-suggests -y \
bison \
libjson-glib-1.0-0 \
Expand All @@ -20,8 +24,11 @@ RUN apt-get update && apt-get install --no-install-recommends --no-install-sugge
pnscan \
libbsd0 \
&& rm -rf /var/lib/apt/lists/*

COPY .docker/openvas.conf /etc/openvas/
COPY --from=feed /opt/greenbone/feed/plugins /var/lib/openvas/plugins
COPY --from=build /install/ /

RUN ldconfig
# allow openvas to access raw sockets and all kind of network related tasks
RUN setcap cap_net_raw,cap_net_admin+eip /usr/local/sbin/openvas
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
.docker/
.github/
.vscode/
.mergify.yml
Expand Down

0 comments on commit 618e95c

Please sign in to comment.