Skip to content

Commit 5d32879

Browse files
committed
chore: dockerize mcrouter
1 parent 0da3ab9 commit 5d32879

1 file changed

Lines changed: 113 additions & 0 deletions

File tree

dockerfiles/mcrouter/Dockerfile

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
FROM debian:10.0-slim as build
2+
3+
ENV \
4+
LANG=C.UTF-8 \
5+
LC_ALL=C.UTF-8 \
6+
FIZZ_VERSION=v2019.07.22.00 \
7+
FOLLY_VERSION=v2019.07.22.00 \
8+
MCROUTER_VERSION=v0.40.0 \
9+
WANGLE_VERSION=v2019.07.22.00
10+
11+
SHELL ["/bin/bash", "-euo", "pipefail", "-c"]
12+
13+
RUN apt-get update \
14+
&& apt-get install -y --no-install-recommends \
15+
autoconf=2.69-11 \
16+
automake=1:1.16.1-4 \
17+
binutils-dev=2.31.1-16 \
18+
build-essential=12.6 \
19+
ca-certificates=20190110 \
20+
cmake=3.13.4-1 \
21+
curl=7.64.0-4 \
22+
flex=2.6.4-6.2 \
23+
g++=4:8.3.0-1 \
24+
gcc=4:8.3.0-1 \
25+
git=1:2.20.1-2 \
26+
gnutls-bin=3.6.7-4 \
27+
libboost-all-dev=1.67.0.1 \
28+
libboost-context-dev=1.67.0.1 \
29+
libbz2-dev=1.0.6-9.1 \
30+
libdouble-conversion-dev=3.1.0-3 \
31+
libevent-dev=2.1.8-stable-4 \
32+
libgflags-dev=2.2.2-1 \
33+
libgoogle-glog-dev=0.3.5-1 \
34+
libgtest-dev=1.8.1-3 \
35+
libjemalloc-dev=5.1.0-3 \
36+
liblzma-dev=5.2.4-1 \
37+
libsnappy-dev=1.1.7-1 \
38+
libsodium-dev=1.0.17-1 \
39+
libssl-dev=1.1.1c-1 \
40+
libssl1.1=1.1.1c-1 \
41+
libtool=2.4.6-9 \
42+
openssl=1.1.1c-1 \
43+
pkg-config=0.29-6 \
44+
python-dev=2.7.16-1 \
45+
ragel=6.10-1 \
46+
zlib1g=1:1.2.11.dfsg-1 \
47+
zlib1g-dev=1:1.2.11.dfsg-1 \
48+
&& apt-get clean \
49+
&& rm -rf /var/lib/apt/lists/*
50+
51+
WORKDIR /usr/src/folly
52+
53+
RUN curl -Ls "https://github.com/facebook/folly/archive/${FOLLY_VERSION}.tar.gz" \
54+
| tar xvzf - --strip-components=1 \
55+
&& cmake configure . \
56+
&& make -j $(nproc) \
57+
&& make install
58+
59+
WORKDIR /usr/src/fizz
60+
61+
RUN curl -Ls "https://github.com/facebookincubator/fizz/archive/${FIZZ_VERSION}.tar.gz" \
62+
| tar xvzf - --strip-components=1 \
63+
&& cd fizz \
64+
&& cmake . \
65+
&& make -j $(nproc) \
66+
&& make install
67+
68+
WORKDIR /usr/src/wangle
69+
70+
RUN curl -Ls "https://github.com/facebook/wangle/archive/${WANGLE_VERSION}.tar.gz" \
71+
| tar xvzf - --strip-components=1 \
72+
&& cmake configure wangle \
73+
&& make -j $(nproc) \
74+
&& make install
75+
76+
WORKDIR /usr/src/mcrouter
77+
78+
RUN curl -Ls "https://github.com/facebook/mcrouter/archive/${MCROUTER_VERSION}.tar.gz" \
79+
| tar xvzf - --strip-components=1 \
80+
&& cd mcrouter \
81+
&& autoreconf --install \
82+
&& ./configure \
83+
&& make -j $(nproc) \
84+
&& rm -rf /usr/src/*
85+
86+
#strip "$INSTALL_DIR"/bin/mcrouter
87+
#strip "$INSTALL_DIR"/bin/mcpiper
88+
#strip --strip-unneeded "$INSTALL_DIR"/lib/libfolly*.so
89+
90+
# run
91+
FROM debian:10.0-slim
92+
93+
SHELL ["/bin/bash", "-euo", "pipefail", "-c"]
94+
95+
RUN apt-get update \
96+
&& apt-get install -y --no-install-recommends \
97+
libssl1.1 \
98+
libevent-2.0-5 \
99+
libgflags2v5 \
100+
libgoogle-glog0v5 \
101+
libboost-context1.62.0 \
102+
libboost-filesystem1.62.0 \
103+
libboost-program-options1.62.0 \
104+
libboost-system1.62.0 \
105+
libboost-regex1.62.0 \
106+
libboost-thread1.62.0 \
107+
libdouble-conversion1 \
108+
&& apt-get clean \
109+
&& rm -rf /var/lib/apt/lists/*
110+
111+
COPY --from=build /mcrouter/mcrouter/mcrouter /usr/local/bin/mcrouter
112+
113+
CMD ["/usr/local/bin/mcrouter"]

0 commit comments

Comments
 (0)