Skip to content

Instantly share code, notes, and snippets.

@kirugan
Created November 1, 2020 15:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kirugan/4f0a07e303b583e03639d43ad4e13284 to your computer and use it in GitHub Desktop.
Save kirugan/4f0a07e303b583e03639d43ad4e13284 to your computer and use it in GitHub Desktop.
Dockefile to build thrift compiler
FROM ubuntu
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y curl git php python php-xml libtool m4 automake pkg-config g++ make
# Install composer
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \
php -r "if (hash_file('sha384', 'composer-setup.php') === 'c31c1e292ad7be5f49291169c0ac8f683499edddcfd4e42232982d0fd193004208a58ff6f353fde0012d35fdd72bc394') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" && \
php composer-setup.php && \
php -r "unlink('composer-setup.php');" && \
mv composer.phar /usr/local/bin/composer;
# Install thrift
RUN curl https://apache-mirror.rbc.ru/pub/apache/thrift/0.13.0/thrift-0.13.0.tar.gz | tar -zx
WORKDIR thrift-0.13.0
RUN ./bootstrap.sh && ./configure --disable-dependency-tracking && make && make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment