forked from zeek/zeek-docker
-
Notifications
You must be signed in to change notification settings - Fork 1
/
2.1.Dockerfile
44 lines (30 loc) · 1.33 KB
/
2.1.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:squeeze
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 && echo 2015-01-23
RUN apt-get -y install build-essential git bison flex gawk cmake swig libssl-dev libgeoip-dev libpcap-dev python-dev libcurl4-openssl-dev wget libncurses5-dev ca-certificates --no-install-recommends
# Bro < 2.3 needs libmagic and ./configure wants the file command
RUN apt-get -y install file libmagic-dev
# Build bro
ENV VER 2.1
RUN cd /tmp && wget http://www.bro.org/downloads/bro-${VER}.tar.gz --no-check-certificate
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|grep -v curl|grep -v openssl)
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /scratch/*
env PATH /bro/bin/:$PATH
CMD /bin/bash -l