Skip to content

Commit 1980d8d

Browse files
authored
Merge pull request #8 from simnalamburt/dockerize
Dockerize the project
2 parents 71918c9 + a4d6ef1 commit 1980d8d

File tree

3 files changed

+34
-6
lines changed

3 files changed

+34
-6
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"]

src/rust/Cargo.toml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[package]
2-
name = "rust regex"
2+
name = "rust-regex"
33
version = "0.1.0"
44
authors = ["Daniel Schmidt"]
55

@@ -8,9 +8,5 @@ name = "rregex"
88
crate-type = ["staticlib"]
99

1010
[dependencies]
11-
regex = { version = "0.2.1"}
11+
regex = "1.1.6"
1212
libc = "0.2.19"
13-
14-
[features]
15-
simd-accel = ["regex/simd-accel"]
16-

0 commit comments

Comments
 (0)