1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-11-28 09:08:36 +02:00
dockerfiles/snort/Dockerfile

61 lines
2.0 KiB
Docker
Raw Normal View History

2015-09-02 19:58:29 +02:00
#
# Dockerfile for snort
#
2015-09-02 20:11:07 +02:00
FROM debian:jessie
2016-05-01 03:06:20 +02:00
MAINTAINER kev <noreply@easypi.info>
2015-09-02 19:58:29 +02:00
2016-06-04 08:02:26 +02:00
ENV DAQ_VERSION 2.0.6
2016-07-10 14:54:46 +02:00
ENV SNORT_VERSION 2.9.8.3
2016-06-04 08:02:26 +02:00
ENV LIBDNET_VERSION 1.12
RUN set -xe \
&& apt-get update \
2015-09-02 19:58:29 +02:00
&& apt-get install -y build-essential \
bison \
curl \
flex \
libdnet \
libdnet-dev \
libpcap0.8 \
libpcap-dev \
libpcre3 \
libpcre3-dev \
zlib1g \
zlib1g-dev \
&& mkdir daq \
2016-06-04 08:02:26 +02:00
&& curl -sSL https://snort.org/downloads/snort/daq-${DAQ_VERSION}.tar.gz | tar xz --strip 1 -C daq \
2015-09-02 19:58:29 +02:00
&& cd daq \
&& ./configure \
&& make install \
&& cd .. \
&& rm -rf daq \
&& mkdir libdnet \
2016-06-04 08:02:26 +02:00
&& curl -sSL https://github.com/dugsong/libdnet/archive/libdnet-${LIBDNET_VERSION}.tar.gz | tar xz --strip 1 -C libdnet \
2015-09-02 19:58:29 +02:00
&& cd libdnet \
&& ./configure \
&& make install \
&& (cd /usr/local/lib && ln -s libdnet.1 libdnet.so.1) \
&& cd .. \
&& rm -rf libdnet \
&& mkdir snort \
2016-06-04 08:02:26 +02:00
&& curl -sSL https://snort.org/downloads/snort/snort-${SNORT_VERSION}.tar.gz | tar xz --strip 1 -C snort \
2015-09-02 19:58:29 +02:00
&& cd snort \
&& ./configure --enable-sourcefire \
&& make install \
&& cd .. \
&& rm -rf snort \
2015-09-03 04:08:27 +02:00
&& mkdir -p /etc/snort/rules \
&& curl -sSL https://snort.org/rules/community | tar xz -C /etc/snort/rules \
2015-09-02 19:58:29 +02:00
&& apt-get purge -y --auto-remove build-essential \
bison \
flex \
libdnet-dev \
libpcap-dev \
libpcre3-dev \
2016-06-04 08:02:26 +02:00
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
2015-09-02 19:58:29 +02:00
2015-09-03 04:08:27 +02:00
ENTRYPOINT ["snort"]
CMD ["--help"]