blob: a85d9e117a2ce35e72320b2e8b401792c02c8771 [file] [log] [blame]
Roger Meier447294f2015-12-11 00:04:41 +01001# 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:
Nobuaki Sukegawadd2223c2016-02-22 21:02:37 +090016# - None
Roger Meier447294f2015-12-11 00:04:41 +010017
18FROM debian:jessie
19MAINTAINER Apache Thrift <dev@thrift.apache.org>
20
21ENV DEBIAN_FRONTEND noninteractive
22
23# General dependencies
24RUN apt-get update && apt-get install -y \
25 apt-transport-https \
26 automake \
27 bison \
28 clang \
29 cmake \
30 debhelper \
31 flex \
32 g++ \
33 git \
34 libtool \
35 make \
36 pkg-config
37
38# C++ dependencies
39RUN apt-get update && apt-get install -y \
40 libboost-dev \
41 libboost-filesystem-dev \
42 libboost-program-options-dev \
43 libboost-system-dev \
44 libboost-test-dev \
45 libboost-thread-dev \
46 libevent-dev \
47 libqt4-dev \
48 libssl-dev
49
50# Java dependencies
51RUN apt-get update && apt-get install -y \
52 ant \
53 openjdk-7-jdk \
54 maven \
55 && update-java-alternatives -s java-1.7.0-openjdk-amd64
56
57# Python dependencies
Nobuaki Sukegawaed23b2b2016-02-28 13:47:44 +090058RUN apt-get update && apt-get install -y --no-install-recommends \
Roger Meier447294f2015-12-11 00:04:41 +010059 python-all \
60 python-all-dev \
61 python-all-dbg \
62 python-setuptools \
63 python-support \
64 python-twisted \
65 python-zope.interface \
Nobuaki Sukegawa25536ad2016-02-04 15:08:55 +090066 python-pip \
Nobuaki Sukegawaed23b2b2016-02-28 13:47:44 +090067 python3-dev \
Nobuaki Sukegawa25536ad2016-02-04 15:08:55 +090068 python3-pip
Roger Meier447294f2015-12-11 00:04:41 +010069
70# Ruby dependencies
71RUN apt-get update && apt-get install -y \
72 ruby \
73 ruby-dev \
74 && gem install bundler rake
75
76# Perl dependencies
77RUN apt-get update && apt-get install -y \
78 libbit-vector-perl \
79 libclass-accessor-class-perl \
80 libcrypt-ssleay-perl \
81 libio-socket-ssl-perl \
82 libnet-ssleay-perl
83
84# Php dependencies
85RUN apt-get update && apt-get install -y \
86 php5 \
87 php5-dev \
88 php5-cli \
89 php-pear \
90 re2c \
91 phpunit
92
93# GlibC dependencies
94RUN apt-get update && apt-get install -y libglib2.0-dev
95
96# Erlang dependencies
97RUN apt-get update && apt-get install -y \
98 erlang-base \
99 erlang-eunit \
100 erlang-dev \
101 erlang-tools \
102 rebar
103
104# Go dependencies
105RUN 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
107
108
109# Haskell dependencies
Nobuaki Sukegawadd2223c2016-02-22 21:02:37 +0900110RUN apt-get update && apt-get install -y --no-install-recommends \
111 ghc \
112 cabal-install
Roger Meier447294f2015-12-11 00:04:41 +0100113
114# Haxe
115RUN apt-get update && apt-get install -y \
116 neko \
117 neko-dev \
118 libneko0 \
119 && mkdir -p /tmp/haxe /usr/lib/haxe && \
120 curl http://haxe.org/website-content/downloads/3.2.0/downloads/haxe-3.2.0-linux64.tar.gz -o /tmp/haxe/haxe-3.2.0-linux64.tar.gz && \
121 tar -xvzf /tmp/haxe/haxe-3.2.0-linux64.tar.gz -C /usr/lib/haxe --strip-components=1 && \
122 ln -s /usr/lib/haxe/haxe /usr/bin/haxe && \
123 ln -s /usr/lib/haxe/haxelib /usr/bin/haxelib && \
124 mkdir -p /usr/lib/haxe/lib && \
125 chmod -R 777 /usr/lib/haxe/lib && \
126 haxelib setup /usr/lib/haxe/lib && \
127 haxelib install hxcpp && \
128 rm -rf /tmp/haxe
129
130
131# Node.js dependencies
132RUN apt-get update && apt-get install -y \
133 nodejs \
134 nodejs-dev \
135 nodejs-legacy \
136 npm
137
138# CSharp dependencies
139RUN apt-get update && apt-get install -y \
140 libmono-system-web2.0-cil \
141 mono-complete \
142 mono-devel \
143 mono-gmcs \
144 mono-xbuild
145
146# D dependencies
Nobuaki Sukegawaeee04d92016-02-22 22:13:31 +0900147RUN apt-get update && apt-get install -y --no-install-recommends xdg-utils && \
148 curl -sSL http://downloads.dlang.org/releases/2.x/2.070.0/dmd_2.070.0-0_amd64.deb -o /tmp/dmd_2.070.0-0_amd64.deb && \
Nobuaki Sukegawa33de26c2016-02-22 01:43:23 +0900149 dpkg -i /tmp/dmd_2.070.0-0_amd64.deb && \
Nobuaki Sukegawaeee04d92016-02-22 22:13:31 +0900150 rm /tmp/dmd_2.070.0-0_amd64.deb && \
151 curl -sSL https://github.com/D-Programming-Deimos/openssl/archive/master.tar.gz| tar xz && \
152 curl -sSL https://github.com/D-Programming-Deimos/libevent/archive/master.tar.gz| tar xz && \
153 mkdir -p /usr/include/dmd/druntime/import/deimos /usr/include/dmd/druntime/import/C && \
154 mv libevent-master/deimos/* openssl-master/deimos/* /usr/include/dmd/druntime/import/deimos/ && \
155 mv libevent-master/C/* openssl-master/C/* /usr/include/dmd/druntime/import/C/ && \
156 rm -rf libevent-master openssl-master && \
157 echo 'gcc -Wl,--no-as-needed $*' > /usr/local/bin/gcc-dmd && \
158 chmod 755 /usr/local/bin/gcc-dmd && \
159 echo 'CC=/usr/local/bin/gcc-dmd' >> /etc/dmd.conf
Roger Meier447294f2015-12-11 00:04:41 +0100160
161# Dart dependencies
162RUN curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
163 curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list && \
164 apt-get update && apt-get install -y dart
165ENV PATH /usr/lib/dart/bin:$PATH
166
167# Lua dependencies
168RUN apt-get update && apt-get install -y \
169 lua5.2 \
170 lua5.2-dev
171
172# MinGW dependencies
173RUN apt-get update && apt-get install -y \
174 mingw32 \
175 mingw32-binutils \
176# mingw32-runtime \
177 nsis
178
179# Clean up
180RUN apt-get clean && \
181 rm -rf /var/cache/apt/* && \
182 rm -rf /var/lib/apt/lists/* && \
183 rm -rf /tmp/* && \
184 rm -rf /var/tmp/*
185
Nobuaki Sukegawadd2223c2016-02-22 21:02:37 +0900186# Force utf8 locale to successfully build Haskell tf-random
187ENV LC_ALL C.UTF-8
188
Roger Meier447294f2015-12-11 00:04:41 +0100189ENV THRIFT_ROOT /thrift
190RUN mkdir -p $THRIFT_ROOT/src
191COPY scripts $THRIFT_ROOT
192WORKDIR $THRIFT_ROOT/src