-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
59 lines (48 loc) · 1.43 KB
/
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
ARG FIXBUF_VERSION=2
FROM cmusei/fixbuf:${FIXBUF_VERSION} AS build
LABEL maintainer="[email protected]"
ARG YAF_VERSION=2.16.1
# Pre-reqs:
# curl for downloading
# build-essentials for build tools
# ca-certs to download https
#
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
build-essential \
pkg-config \
ca-certificates \
libglib2.0-dev \
libssl-dev \
libpcap-dev \
zlib1g-dev \
libpcre3-dev \
&& apt-get clean && \
rm -rf /var/lib/apt/lists/*
WORKDIR /netsa
ARG enable_dpi=''
RUN curl https://tools.netsa.cert.org/releases/yaf-$YAF_VERSION.tar.gz | \
tar -xz && cd yaf-* && \
./configure --prefix=/netsa ${enable_dpi} \
--enable-plugins \
--enable-applabel \
--with-libfixbuf=/netsa/lib/pkgconfig && \
make && \
make install && \
cd ../ && rm -rf yaf-$YAF_VERSION
FROM debian:11-slim
LABEL maintainer="[email protected]"
RUN apt-get update && apt-get install -y --no-install-recommends \
pkg-config \
libglib2.0-0 \
libpcap0.8 \
zlib1g \
libssl1.1 \
libpcre3 \
&& apt-get clean && \
rm -rf /var/lib/apt/lists/*
COPY --from=build /netsa/ /netsa/
COPY docker-entrypoint.sh /usr/local/bin/
RUN ln -s /usr/local/bin/docker-entrypoint.sh /
ENV PATH=$PATH:/netsa/bin
ENTRYPOINT ["docker-entrypoint.sh"]