forked from VectorCamp/vectorscan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
50 lines (42 loc) · 1.26 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
FROM alpine:3.18
RUN apk add --no-cache \
bash \
boost-dev \
build-base \
cmake \
curl \
pkgconfig
ENV COLM_VERSION=0.14.7
ENV RAGEL_VERSION=7.0.4
RUN mkdir -p /build && cd build && curl -O https://www.colm.net/files/colm/colm-${COLM_VERSION}.tar.gz && \
tar -zxvf colm-${COLM_VERSION}.tar.gz && \
cd /build/colm-${COLM_VERSION} && \
./configure --prefix=/opt/colm/colm --disable-manual && make -j$(nproc) && make install && \
cd /build && \
curl -O https://www.colm.net/files/ragel/ragel-${RAGEL_VERSION}.tar.gz && \
tar -zxvf ragel-${RAGEL_VERSION}.tar.gz && \
cd /build/ragel-${RAGEL_VERSION} && \
./configure --prefix=/opt/colm/ragel --with-colm=/opt/colm/colm --disable-manual && make -j$(nproc) && make install && \
rm -rf /build
ENV PATH="/opt/colm/ragel/bin/:$PATH"
COPY . /src/
RUN bash <<EOF
set -eux
(
cd /src
mkdir -p build
cd build
cmake ..
make -j$(nproc) hs
make install
)
rm -rf /src
tar -cjf /vectorscan.tar.bz2 \
/usr/local/lib/pkgconfig/libhs.pc \
/usr/local/include/hs/hs.h \
/usr/local/include/hs/hs_common.h \
/usr/local/include/hs/hs_compile.h \
/usr/local/include/hs/hs_runtime.h \
/usr/local/lib/libhs_runtime.a \
/usr/local/lib/libhs.a
EOF