forked from line/centraldogma
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.trusty
More file actions
50 lines (39 loc) · 1.22 KB
/
Copy pathDockerfile.trusty
File metadata and controls
50 lines (39 loc) · 1.22 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
# This builds a Thrift binary without library support (only for code generation),
# because the Apache Thrift official repo no longer maintains a binary distribution
FROM ubuntu:trusty AS builder
ENV DEBIAN_FRONTEND=noninteractive
# See https://archive.apache.org/dist/thrift/
ENV THRIFT_VERSION=0.23.0
# See https://thrift.apache.org/docs/install/debian.html
RUN apt-get update -yq && \
apt-get install -y --no-install-recommends \
automake \
bison \
binutils \
flex \
g++ \
git \
libboost-all-dev \
libevent-dev \
libssl-dev \
libtool \
make \
pkg-config
ADD https://archive.apache.org/dist/thrift/${THRIFT_VERSION}/thrift-${THRIFT_VERSION}.tar.gz /tmp/thrift.tar.gz
RUN echo "1859d932d2ae1f13d16c5a196931208c116310a5ff50f2bfd11d3db03be8f46f /tmp/thrift.tar.gz" | sha256sum -c && \
tar xzf /tmp/thrift.tar.gz -C /tmp
RUN cd /tmp/thrift-${THRIFT_VERSION} && \
./bootstrap.sh && \
./configure \
--disable-debug \
--disable-tests \
--disable-libs \
&& \
make -j$(nproc) && \
make install
# Minimizing Thrift binary size
RUN /usr/bin/strip /usr/local/bin/thrift
FROM ubuntu:trusty
COPY --from=builder /usr/local/bin/thrift /usr/local/bin/thrift
ENTRYPOINT [ "/usr/local/bin/thrift" ]
CMD [ "-help" ]