-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
39 lines (28 loc) · 953 Bytes
/
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
FROM ubuntu:latest
#Install logstash
RUN apt-get update && apt-get install wget gnupg2 gnupg1 default-jre -y
RUN wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | apt-key add -
RUN apt-get install apt-transport-https -y
RUN echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | tee -a /etc/apt/sources.list.d/elastic-7.x.list
RUN apt-get update && apt-get install logstash -y
#Install python deps
RUN apt-get update && apt-get install gettext-base python3 python3-pip telnet curl vim -y
RUN pip3 install gvm-tools untangle
RUN pip3 install --user python-gvm
#Setup User
RUN useradd gvm
RUN mkdir /home/gvm
COPY code/ /home/gvm
RUN chown gvm:gvm -R /home/gvm
RUN chown gvm:gvm -R /usr/share/logstash
#Setup defult settings
ENV USERNAME=admin
ENV PASSWORD=admin
ENV GSAD_HOST=gvmd
ENV DATA=data
#Setup run script
COPY run.sh /home/gvm/run.sh
RUN chmod +x /home/gvm/run.sh
USER gvm
WORKDIR /home/gvm/
CMD ./run.sh