forked from facebookarchive/scribe
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
56 lines (43 loc) · 1.77 KB
/
Dockerfile
File metadata and controls
56 lines (43 loc) · 1.77 KB
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
51
52
53
54
55
56
FROM ubuntu:20.04
ENV DEBIAN_FRONTEND=noninteractive
# Last Package Update & Install
RUN apt-get update && apt-get install -y curl cmake supervisor openssh-server libboost-all-dev net-tools iputils-ping vim \
make autoconf automake flex bison libtool libevent-dev pkg-config libssl-dev libbz2-dev build-essential g++ python-dev git
# Facebook Scribe
# Thrift
ENV thrift_src /usr/local/src/thrift
RUN git clone https://github.com/apache/thrift.git $thrift_src \
&& cd $thrift_src && git checkout v0.12.0 \
&& ./bootstrap.sh && ./configure && make && make install
# fb303
RUN cd $thrift_src/contrib/fb303 \
&& ./bootstrap.sh \
&& ./configure CPPFLAGS="-DHAVE_INTTYPES_H -DHAVE_NETINET_IN_H" \
&& make && make install
# fb303 python module
RUN cd $thrift_src/lib/py \
&& python setup.py install \
&& cd $thrift_src/contrib/fb303/py \
&& python setup.py install
RUN curl https://bootstrap.pypa.io/get-pip.py --output get-pip.py && \
python2 get-pip.py && \
pip2 install six
# Scribe
ENV scribe_src /usr/local/src/scribe
COPY ./ ${scribe_src}
RUN cd $scribe_src && \
thrift --gen cpp:pure_enums -o src/ ./if/scribe.thrift && \
thrift --gen cpp:pure_enums -o src/ ./if/bucketupdater.thrift && \
cmake . && make
# Scribe python module
RUN cd $scribe_src/lib/py && python setup.py install
# Copy conf
RUN mkdir /usr/local/scribe
RUN cp $scribe_src/examples/example2client.conf /usr/local/scribe/scribe.conf
RUN apt-get install -y php
RUN cd $scribe_src/if/ && thrift -r --gen php scribe.thrift \
&& thrift -r --gen php bucketupdater.thrift
# Tests
RUN mkdir /tmp/scribetest
RUN ln -s /usr/local/src/scribe/if/gen-php/ /usr/local/src/thrift/lib/php/src/packages
WORKDIR /usr/local/src/scribe