blob: 1881343eeca0c2feac3759a58495db1b81f00012 [file] [log] [blame]
jfarrelle03f7e82015-02-18 23:25:54 -05001# Licensed under the Apache License, Version 2.0 (the "License");
2# you may not use this file except in compliance with the License.
3# You may obtain a copy of the License at
4#
5# http://www.apache.org/licenses/LICENSE-2.0
6#
7# Unless required by applicable law or agreed to in writing, software
8# distributed under the License is distributed on an "AS IS" BASIS,
9# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10# See the License for the specific language governing permissions and
11# limitations under the License.
12
13# Apache Thrift Docker build environment for Centos
14#
15# Known missing client libraries:
16# - D
17# - Haxe
jfarrell763841b2015-06-24 09:11:54 -040018# - Lua
jfarrelle03f7e82015-02-18 23:25:54 -050019#
20
jfarrell763841b2015-06-24 09:11:54 -040021FROM centos:7
jfarrelle03f7e82015-02-18 23:25:54 -050022MAINTAINER Apache Thrift <dev@thrift.apache.org>
23
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +090024RUN yum install -y epel-release
jfarrelle03f7e82015-02-18 23:25:54 -050025
jfarrelle03f7e82015-02-18 23:25:54 -050026# General dependencies
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +090027RUN yum install -y \
28 tar \
29 m4 \
30 perl \
31 clang \
32 gcc \
33 gcc-c++ \
34 git \
35 libtool \
36 autoconf \
37 make \
38 bison \
39 bison-devel \
40 flex
jfarrelle03f7e82015-02-18 23:25:54 -050041
jfarrell763841b2015-06-24 09:11:54 -040042# C++ dependencies
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +090043RUN yum install -y \
44 boost-devel-static \
45 zlib-devel \
46 openssl-devel \
47 libevent-devel
jfarrelle03f7e82015-02-18 23:25:54 -050048
49# Java Dependencies
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +090050RUN yum install -y \
51 ant \
52 junit \
53 ant-junit \
54 java-1.7.0-openjdk-devel
jfarrelle03f7e82015-02-18 23:25:54 -050055
56# Python Dependencies
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +090057RUN yum install -y \
58 python-devel \
Nobuaki Sukegawabf9fa902016-09-04 18:49:21 +090059 python-pip \
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +090060 python-setuptools \
Nobuaki Sukegawabf9fa902016-09-04 18:49:21 +090061 python-six \
62 python-twisted-web && \
63 pip install -U backports.ssl_match_hostname ipaddress tornado
jfarrelle03f7e82015-02-18 23:25:54 -050064
65# Ruby Dependencies
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +090066RUN yum install -y \
67 ruby \
68 ruby-devel \
69 rubygems && \
jfarrelle03f7e82015-02-18 23:25:54 -050070 gem install bundler rake
71
jfarrelle03f7e82015-02-18 23:25:54 -050072# Perl Dependencies
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +090073RUN yum install -y \
74 perl-Bit-Vector \
75 perl-Class-Accessor \
76 perl-ExtUtils-MakeMaker \
77 perl-Test-Simple \
78 perl-IO-Socket-SSL \
79 perl-Net-SSLeay \
80 perl-Crypt-SSLeay
jfarrelle03f7e82015-02-18 23:25:54 -050081
82# PHP Dependencies
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +090083RUN yum install -y \
84 php \
85 php-devel \
86 php-pear \
87 re2c \
88 php-phpunit-PHPUnit \
89 bzip2
jfarrelle03f7e82015-02-18 23:25:54 -050090
91# GLibC Dependencies
92RUN yum install -y glib2-devel
93
94# Erlang Dependencies
jfarrellb2e90c12015-07-27 08:49:53 -040095RUN curl -sSL http://packages.erlang-solutions.com/rpm/centos/erlang_solutions.repo -o /etc/yum.repos.d/erlang_solutions.repo && \
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +090096 yum install -y \
97 erlang-kernel \
98 erlang-erts \
99 erlang-stdlib \
100 erlang-eunit \
101 erlang-rebar \
102 erlang-tools
jfarrelle03f7e82015-02-18 23:25:54 -0500103
jfarrelle03f7e82015-02-18 23:25:54 -0500104# Go Dependencies
Nobuaki Sukegawaa8c74d52015-11-10 16:37:52 +0900105RUN curl -sSL https://storage.googleapis.com/golang/go1.4.3.linux-amd64.tar.gz | tar -C /usr/local/ -xz
106ENV PATH /usr/local/go/bin:$PATH
jfarrelle03f7e82015-02-18 23:25:54 -0500107
jfarrelle03f7e82015-02-18 23:25:54 -0500108# Haskell Dependencies
Nobuaki Sukegawaa8c74d52015-11-10 16:37:52 +0900109RUN yum -y install haskell-platform
jfarrelle03f7e82015-02-18 23:25:54 -0500110
jfarrellb2e90c12015-07-27 08:49:53 -0400111# Node.js Dependencies
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +0900112RUN yum install -y \
113 nodejs \
114 nodejs-devel \
115 npm
jfarrellb2e90c12015-07-27 08:49:53 -0400116
117# C# Dependencies
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +0900118RUN yum install -y \
119 mono-core \
120 mono-devel \
121 mono-web-devel \
Allen Georgebc1344d2017-04-28 10:22:03 -0400122 mono-extras
123
124# Rust
125RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain 1.17.0
126ENV PATH /root/.cargo/bin:$PATH
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +0900127
128# MinGW Dependencies
129RUN yum install -y \
130 mingw32-binutils \
131 mingw32-crt \
132 mingw32-nsis
133
134# CMake
135RUN curl -sSL https://cmake.org/files/v3.4/cmake-3.4.0.tar.gz | tar -xz && \
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +0900136 cd cmake-3.4.0 && ./bootstrap && make -j4 && make install && \
137 cd .. && rm -rf cmake-3.4.0
jfarrellb2e90c12015-07-27 08:49:53 -0400138
jfarrelle03f7e82015-02-18 23:25:54 -0500139# Clean up
jfarrell763841b2015-06-24 09:11:54 -0400140RUN rm -rf /tmp/* && \
141 yum clean all
jfarrelle03f7e82015-02-18 23:25:54 -0500142
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +0900143ENV THRIFT_ROOT /thrift
144RUN mkdir -p $THRIFT_ROOT/src
Nobuaki Sukegawa93fb7ea2016-09-04 17:00:11 +0900145COPY Dockerfile $THRIFT_ROOT/
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +0900146WORKDIR $THRIFT_ROOT/src