To build the thrift binary, we'll use the CentOS 7 docker image provided by the Thrift project.
Below are the basic steps:
- get the dockerfile
- get thrift tarball
- extract tarball
- build thrift
make get_dockerfile build_image
make get_thrift extract_thrift
# this step puts you inside the container, ready to build thrift
make build_thrift
# once in the container, run configure, make and make install, for example:
./configure --without-ruby --without-d --without-dart --without-haskell --without-erlang --without-nodejs --without-ocaml --without-php --without-lua --without-perl --without-rust
make
make install
# copy the thrift binary to a directory that'll exist outside the container once you exit
cp /usr/local/bin/thrift .