added sep dockerfiles

This commit is contained in:
Tobias Kessels
2019-04-29 23:49:27 +02:00
parent 16a55555a0
commit 94e16ac5c2
4 changed files with 68 additions and 0 deletions

7
dockerfiles/sep/build.sh Executable file
View File

@@ -0,0 +1,7 @@
#!/bin/bash
docker build -t tabledevil/sep:latest -f sep_dev.dockerfile .
tag=$(docker run -it tabledevil/sep:latest version | grep -Pio "(?<=Dockertag: )[\d._]+" )
echo "NEW TAG : ${tag}"
docker tag tabledevil/sep tabledevil/sep:${tag}
docker push "tabledevil/sep:${tag}"
docker push "tabledevil/sep:latest"

View File

@@ -0,0 +1,12 @@
FROM ubuntu:16.04
LABEL maintainer="tabledevil"
LABEL docker.cmd="docker run -it --rm -v /mnt/sdc1:/data sep"
RUN apt-get update && apt-get install -y wget default-jre lib32ncurses5 lib32z1 sharutils ; rm -rf /var/lib/apt/lists/*
ADD sep.tar.gz /root/
WORKDIR /root
RUN chmod +x /root/sep/install.sh
RUN /root/sep/install.sh -i && rm -rf /root/sep
RUN ln -s /opt/Symantec/symantec_antivirus/sav /usr/local/bin/sav
WORKDIR /data

View File

@@ -0,0 +1,11 @@
FROM tabledevil/sep:base
LABEL maintainer="tabledevil"
LABEL docker.cmd="docker run -it --rm -v /mnt/sdc1:/data sep"
ADD start.sh /root/start.sh
RUN chmod +x /root/start.sh
ENTRYPOINT ["/root/start.sh"]
CMD ["shell"]
#RUN wget ftp://ftp.symantec.com/AVDEFS/symantec_antivirus_corp/static/symcdefs-core15unix.sh && chmod +x symcdefs-core15unix.sh && ./symcdefs-core15unix.sh && rm ./symcdefs-core15unix.sh
RUN service rtvscand start ; sleep 10 ; sav liveupdate -u ; sleep 10 ; while ! (sav info -d | grep -Pq '^\d') ; do sleep 1 ; done ; sav info -d | tee /root/tag ; service rtvscand stop ; sleep 10

38
dockerfiles/sep/start.sh Normal file
View File

@@ -0,0 +1,38 @@
#!/bin/bash
echo "stage: ${1}"
case "${1}" in
shell )
service rtvscand start
echo "Usage:"
echo "sav manualscan -c <file>"
/bin/bash
;;
version )
service rtvscand start
sleep 5
sep_dev=$(sav info -d | tr -d '\r\n')
sep_vers=$(sav info -p | tr -d '\r\n' )
docker_tag=$(echo -n "${sep_dev}" | sed -e 's/rev./_/' -e 's/ //g' -e 's|/|.|g' -e 's/\([0-9]\{2\}\).\([0-9]\{2\}\).\([0-9]\{2\}\)/\2.\1.\3/g' )
kernel_vers=$(uname -r)
os_vers=$(head /etc/issue)
echo "OS version: ${os_vers}"
echo "Kernelversion: ${kernel_vers}"
echo "Virusdefinition: ${sep_dev}"
echo "Productversion: ${sep_vers}"
echo "Dockertag: ${docker_tag}"
echo "Java Version:"
java -version
;;
scan )
service rtvscand start
sleep 5
sav manualscan -c /data
;;
tag )
cat /root/tag
;;
debug )
/bin/bash
;;
esac