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