blob: e30663f82aeeef34dbe881801f6f95041ec001b8 (
plain) (
blame)
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
|
FROM ubuntu:18.04
ENV RAGEL_VERSION 6.10
ENV HYPERSCAN_VERSION 5.2.1
ENV GO_VERSION 1.14.1
ENV NODE_VERSION v12.18.2
ENV NODE_DISTRO linux-x64
ENV PATH /usr/local/lib/nodejs/node-$NODE_VERSION-$NODE_DISTRO/bin:/usr/local/go/bin:$PATH
# Install tools and libraries
RUN apt-get update && apt-get install -y git wget make cmake build-essential python3 libpcap-dev pkg-config
# Get Boost source to compile Hyperscan
RUN wget https://dl.bintray.com/boostorg/release/1.72.0/source/boost_1_72_0.tar.gz -P /tmp/ && \
tar -C /tmp/ -xzf /tmp/boost_1_72_0.tar.gz
# Get Ragel source and install it
RUN wget http://www.colm.net/files/ragel/ragel-$RAGEL_VERSION.tar.gz -P /tmp && \
tar -C /tmp/ -xzf /tmp/ragel-$RAGEL_VERSION.tar.gz && \
cd /tmp/ragel-$RAGEL_VERSION/ && \
./configure && \
make && \
make install
# Get Hyperscan source and install it
RUN wget https://github.com/intel/hyperscan/archive/v$HYPERSCAN_VERSION.tar.gz -P /tmp && \
tar -C /tmp/ -xzf /tmp/v$HYPERSCAN_VERSION.tar.gz && \
cd /tmp/hyperscan-$HYPERSCAN_VERSION/ && \
mkdir build && \
cd build && \
cmake -G "Unix Makefiles" -DCMAKE_CXX_COMPILER=/usr/bin/g++ -DBUILD_STATIC_AND_SHARED=1 \
-DBOOST_ROOT=/tmp/boost_1_72_0 .. && \
make && \
make install && \
ln -s /usr/local/lib/libhs.so.5 /usr/lib/libhs.so.5
# Get GoLang and install it
RUN wget https://dl.google.com/go/go$GO_VERSION.linux-amd64.tar.gz -P /tmp && \
tar -C /usr/local -xzf /tmp/go$GO_VERSION.linux-amd64.tar.gz
# Get NodeJs and install it
RUN wget https://nodejs.org/dist/$NODE_VERSION/node-$NODE_VERSION-$NODE_DISTRO.tar.xz -P /tmp/ && \
mkdir -p /usr/local/lib/nodejs && \
tar -C /usr/local/lib/nodejs -xJf /tmp/node-$NODE_VERSION-$NODE_DISTRO.tar.xz
# Remove source files
RUN rm -rf /tmp/*
CMD /bin/bash
|