Skip to content

Commit a4d6ef1

Browse files
committed
Dockerize the project
1 parent ebff1ee commit a4d6ef1

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

.dockerignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# etc
2+
/.travis.yml
3+
/LICENSE
4+
/README.md

Dockerfile

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
FROM debian:9
2+
3+
# Install basic dependencies
4+
RUN apt-get update -y && apt-get install -y \
5+
g++ \
6+
cmake ragel python3 \
7+
libboost-dev libpcap-dev \
8+
autoconf automake autopoint \
9+
gettext libtool git
10+
11+
# Install rustc
12+
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
13+
ENV PATH="/root/.cargo/bin:${PATH}"
14+
15+
# Install tini
16+
ENV TINI_VERSION v0.18.0
17+
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /usr/local/sbin/tini
18+
RUN chmod +x /usr/local/sbin/tini
19+
20+
# Setup project
21+
WORKDIR /a
22+
COPY . .
23+
WORKDIR /a/build
24+
RUN cmake ..
25+
RUN make
26+
27+
ENTRYPOINT ["/usr/local/sbin/tini", "--"]
28+
CMD ["./src/regex_perf", "-f", "../3200.txt"]

0 commit comments

Comments
 (0)