blob: f79939c72f2602c2c44f83aca5d6ef3e7c23597d [file] [log] [blame]
James E. King, IIId7142b72017-09-01 13:00:36 -07001# 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# - dotnet (will update to 2.0.0 separately)
17# - haxe (not in debian stretch)
18
19FROM centos:7.3.1611
20MAINTAINER Apache Thrift <dev@thrift.apache.org>
21
22RUN yum install -y epel-release
23
24# General dependencies
25RUN yum install -y \
26 autoconf \
27 bison \
28 bison-devel \
29 clang \
30 clang-analyzer \
31 cmake3 \
32 curl \
33 flex \
34 gcc \
35 gcc-c++ \
36 git \
37 libtool \
38 m4 \
39 make \
40 tar \
41 unzip \
42 wget && \
43 ln -s /usr/bin/cmake3 /usr/bin/cmake && \
44 ln -s /usr/bin/cpack3 /usr/bin/cpack && \
45 ln -s /usr/bin/ctest3 /usr/bin/ctest
46
47# C++ dependencies
48RUN yum install -y \
49 boost-devel-static \
50 zlib-devel \
51 openssl-devel \
52 libevent-devel && \
53 cd /usr/lib64 && \
54 ln -s libboost_thread-mt.a libboost_thread.a
55
56# C# Dependencies
57RUN yum install -y \
58 mono-core \
59 mono-devel \
60 mono-web-devel \
61 mono-extras
62
63# D Dependencies
64RUN yum install -y http://downloads.dlang.org/releases/2.x/2.076.0/dmd-2.076.0-0.fedora.x86_64.rpm xdg-utils
65RUN curl -sSL https://github.com/D-Programming-Deimos/openssl/archive/master.tar.gz| tar xz && \
66 curl -sSL https://github.com/D-Programming-Deimos/libevent/archive/master.tar.gz| tar xz && \
67 mkdir -p /usr/include/dmd/druntime/import/deimos /usr/include/dmd/druntime/import/C && \
68 mv libevent-master/deimos/* openssl-master/deimos/* /usr/include/dmd/druntime/import/deimos/ && \
69 mv libevent-master/C/* openssl-master/C/* /usr/include/dmd/druntime/import/C/ && \
70 rm -rf libevent-master openssl-master
71
72# Dart
73RUN cd /usr/local && \
74 wget -q https://storage.googleapis.com/dart-archive/channels/stable/release/1.24.2/sdk/dartsdk-linux-x64-release.zip && \
75 unzip -q dartsdk-linux-x64-release.zip && \
76 rm dartsdk-linux-x64-release.zip
77ENV PATH /usr/local/dart-sdk/bin:$PATH
78
79# Erlang Dependencies
80RUN curl -sSL http://packages.erlang-solutions.com/rpm/centos/erlang_solutions.repo -o /etc/yum.repos.d/erlang_solutions.repo && \
81 yum install -y \
82 erlang-kernel \
83 erlang-erts \
84 erlang-stdlib \
85 erlang-eunit \
86 erlang-rebar \
87 erlang-tools
88
89# GLibC Dependencies
90RUN yum install -y glib2-devel
91
92# Go Dependencies
93RUN curl -sSL https://storage.googleapis.com/golang/go1.9.linux-amd64.tar.gz | tar -C /usr/local/ -xz
94ENV PATH /usr/local/go/bin:$PATH
95
96# Haskell Dependencies
97RUN yum -y install haskell-platform
98
99# Haxe Dependencies
100# Not in debian/stretch
101
102# Java Dependencies
103RUN yum install -y \
104 ant \
105 junit \
106 ant-junit \
107 java-1.8.0-openjdk-devel
108
109# Lua Dependencies
110# Lua in epel is too old (5.1.4, need 5.2) so we get the latest
111RUN yum install -y readline-devel && \
112 wget -q http://www.lua.org/ftp/lua-5.3.4.tar.gz && \
113 tar xzf lua-5.3.4.tar.gz && \
114 cd lua-5.3.4 && \
115 sed -i 's/CFLAGS= /CFLAGS= -fPIC /g' src/Makefile && \
116 make linux && \
117 make install && \
118 cd .. && \
119 rm -rf lua-5*
120
121# MinGW Dependencies
122RUN yum install -y \
123 mingw32-binutils \
124 mingw32-crt \
125 mingw32-nsis
126
127# Node.js Dependencies
128# Work around epel issue where they removed http-parser that nodejs depends on!
129RUN yum -y install https://opensource.enda.eu/packages/http-parser-2.7.1-3.el7.x86_64.rpm
130RUN yum install -y \
131 nodejs \
132 npm
133
134# Ocaml Dependencies
135RUN yum install -y \
136 ocaml \
137 ocaml-ocamldoc && \
138 wget -q https://raw.github.com/ocaml/opam/master/shell/opam_installer.sh -O - | sh -s /usr/local/bin && \
139 opam init --yes && \
140 opam install --yes oasis && \
141 echo '. /root/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true' >> ~/.bashrc
142
143# Perl Dependencies
144RUN yum install -y \
145 perl \
146 perl-version \
147 perl-Bit-Vector \
148 perl-Class-Accessor \
149 perl-ExtUtils-MakeMaker \
150 perl-Test-Simple \
151 perl-IO-Socket-SSL \
152 perl-Net-SSLeay \
153 perl-Crypt-SSLeay
154
155# PHP Dependencies
156RUN yum install -y \
157 php \
158 php-devel \
159 php-pear \
160 re2c \
161 php-phpunit-PHPUnit \
162 bzip2
163
164# Python Dependencies
165RUN yum install -y \
166 python \
167 python-devel \
168 python-pip \
169 python-setuptools \
170 python34 \
171 python34-devel \
172 python34-pip \
173 python34-setuptools
174RUN pip2 install --upgrade pip
175RUN pip2 install --upgrade backports.ssl_match_hostname ipaddress setuptools six tornado tornado-testing twisted virtualenv zope-interface
176RUN pip3 install --upgrade pip
177RUN pip3 install --upgrade backports.ssl_match_hostname ipaddress setuptools six tornado tornado-testing twisted virtualenv zope-interface
178
179# Ruby Dependencies
180RUN yum install -y \
181 ruby \
182 ruby-devel \
183 rubygems && \
184 gem install bundler rake
185
186# Rust
187RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain 1.17.0
188ENV PATH /root/.cargo/bin:$PATH
189
190# Clean up
191RUN rm -rf /tmp/* && \
192 yum clean all
193
194ENV THRIFT_ROOT /thrift
195RUN mkdir -p $THRIFT_ROOT/src
196COPY Dockerfile $THRIFT_ROOT/
197WORKDIR $THRIFT_ROOT/src