forked from zeek/zeek-docker
-
Notifications
You must be signed in to change notification settings - Fork 1
/
2.5.Dockerfile
44 lines (30 loc) · 1.24 KB
/
2.5.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
# bro
#
# VERSION 0.1
FROM debian:stretch
MAINTAINER Justin Azoff <[email protected]>
ENV WD /scratch
RUN mkdir ${WD}
WORKDIR /scratch
RUN dpkg -l | awk '{print $2}' | sort > old.txt
RUN apt-get update && apt-get upgrade -y && echo 2017-05-11
RUN apt-get -y install build-essential git bison flex gawk cmake swig libssl1.0-dev libgeoip-dev libpcap-dev python-dev libcurl4-openssl-dev wget libncurses5-dev ca-certificates zlib1g-dev --no-install-recommends
#Checkout bro
# Build bro
ENV VER 2.5
ADD ./common/install-caf ${WD}/common/install-caf
RUN ${WD}/common/install-caf 0.14.4
ADD ./common/buildbro ${WD}/common/buildbro
RUN ${WD}/common/buildbro bro ${VER}
RUN ln -s /usr/local/bro-${VER} /bro
# Final setup stuff
ADD ./common/getgeo.sh /usr/local/bin/getgeo.sh
RUN /usr/local/bin/getgeo.sh
ADD ./common/bro_profile.sh /etc/profile.d/bro.sh
# Cleanup, so docker-squash can do it's thing
RUN dpkg -l | awk '{print $2}' | sort > new.txt
RUN apt-get -y remove --purge $(comm -13 old.txt new.txt|grep -- -dev)
RUN apt-get -y remove --purge $(comm -13 old.txt new.txt|grep -v lib|grep -v ca-certificates|grep -v wget)
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /scratch/*
env PATH /bro/bin/:$PATH
CMD /bin/bash -l