blob: 5180fca67896b2bca26a7a66e98c984f559c2c36 [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# - None
17
18FROM ubuntu:trusty
19MAINTAINER Apache Thrift <dev@thrift.apache.org>
20
jfarrelle03f7e82015-02-18 23:25:54 -050021ENV DEBIAN_FRONTEND noninteractive
22
jfarrelle03f7e82015-02-18 23:25:54 -050023# General dependencies
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +090024RUN 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
jfarrelle03f7e82015-02-18 23:25:54 -050037
38# C++ dependencies
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +090039RUN 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
jfarrelle03f7e82015-02-18 23:25:54 -050049
50# Java dependencies
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +090051RUN 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
jfarrelle03f7e82015-02-18 23:25:54 -050056
57# Python dependencies
Nobuaki Sukegawaed23b2b2016-02-28 13:47:44 +090058RUN apt-get update && apt-get install -y --no-install-recommends \
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +090059 python-all \
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +090060 python-all-dbg \
Nobuaki Sukegawaed23b2b2016-02-28 13:47:44 +090061 python-all-dev \
62 python-pip \
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +090063 python-setuptools \
64 python-support \
65 python-twisted \
66 python-zope.interface \
Nobuaki Sukegawaed23b2b2016-02-28 13:47:44 +090067 python3-dev \
Nobuaki Sukegawa25536ad2016-02-04 15:08:55 +090068 python3-pip
jfarrelle03f7e82015-02-18 23:25:54 -050069
70# Ruby dependencies
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +090071RUN apt-get update && apt-get install -y \
72 ruby \
73 ruby-dev \
74 && gem install bundler rake
jfarrelle03f7e82015-02-18 23:25:54 -050075
76# Perl dependencies
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +090077RUN 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
jfarrelle03f7e82015-02-18 23:25:54 -050083
84# Php dependencies
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +090085RUN apt-get update && apt-get install -y \
86 php5 \
87 php5-dev \
88 php5-cli \
89 php-pear \
90 re2c \
91 phpunit
jfarrelle03f7e82015-02-18 23:25:54 -050092
93# GlibC dependencies
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +090094RUN apt-get update && apt-get install -y libglib2.0-dev
jfarrelle03f7e82015-02-18 23:25:54 -050095
96# Erlang dependencies
jfarrellb2e90c12015-07-27 08:49:53 -040097RUN echo 'deb http://packages.erlang-solutions.com/debian trusty contrib' > /etc/apt/sources.list.d/erlang_solutions.list && \
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +090098 curl -sSL http://packages.erlang-solutions.com/debian/erlang_solutions.asc | apt-key add - && \
99 apt-get update && apt-get install -y \
100 erlang-base \
101 erlang-eunit \
102 erlang-dev \
103 erlang-tools \
104 rebar
jfarrelle03f7e82015-02-18 23:25:54 -0500105
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +0900106# Go dependencies
107RUN curl -sSL https://storage.googleapis.com/golang/go1.4.3.linux-amd64.tar.gz | tar -C /usr/local/ -xz
108ENV PATH /usr/local/go/bin:$PATH
jfarrell763841b2015-06-24 09:11:54 -0400109
jfarrelle03f7e82015-02-18 23:25:54 -0500110
111# Haskell dependencies
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +0900112RUN apt-get update && apt-get install -y \
113 ghc \
114 cabal-install \
115 libghc-binary-dev \
116 libghc-network-dev \
117 libghc-http-dev \
118 libghc-hashable-dev \
119 libghc-unordered-containers-dev \
120 libghc-vector-dev
jfarrelle03f7e82015-02-18 23:25:54 -0500121
122# Haxe
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +0900123RUN apt-get update && apt-get install -y \
124 neko \
125 neko-dev \
126 libneko0 \
127 && mkdir -p /tmp/haxe /usr/lib/haxe && \
jfarrellb2e90c12015-07-27 08:49:53 -0400128 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 && \
129 tar -xvzf /tmp/haxe/haxe-3.2.0-linux64.tar.gz -C /usr/lib/haxe --strip-components=1 && \
jfarrelle03f7e82015-02-18 23:25:54 -0500130 ln -s /usr/lib/haxe/haxe /usr/bin/haxe && \
131 ln -s /usr/lib/haxe/haxelib /usr/bin/haxelib && \
jfarrelle03f7e82015-02-18 23:25:54 -0500132 mkdir -p /usr/lib/haxe/lib && \
133 chmod -R 777 /usr/lib/haxe/lib && \
134 haxelib setup /usr/lib/haxe/lib && \
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +0900135 haxelib install hxcpp && \
136 rm -rf /tmp/haxe
jfarrelle03f7e82015-02-18 23:25:54 -0500137
jfarrelle03f7e82015-02-18 23:25:54 -0500138
139# Node.js dependencies
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +0900140RUN apt-get update && apt-get install -y \
141 nodejs \
142 nodejs-dev \
143 nodejs-legacy \
144 npm
jfarrelle03f7e82015-02-18 23:25:54 -0500145
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +0900146# CSharp dependencies
147RUN apt-get update && apt-get install -y \
148 libmono-system-web2.0-cil \
149 mono-complete \
150 mono-devel \
151 mono-gmcs \
152 mono-xbuild
jfarrelle03f7e82015-02-18 23:25:54 -0500153
154# D dependencies
Nobuaki Sukegawaeee04d92016-02-22 22:13:31 +0900155RUN apt-get update && apt-get install -y --no-install-recommends xdg-utils && \
156 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 +0900157 dpkg -i /tmp/dmd_2.070.0-0_amd64.deb && \
Nobuaki Sukegawaeee04d92016-02-22 22:13:31 +0900158 rm /tmp/dmd_2.070.0-0_amd64.deb && \
159 curl -sSL https://github.com/D-Programming-Deimos/openssl/archive/master.tar.gz| tar xz && \
160 curl -sSL https://github.com/D-Programming-Deimos/libevent/archive/master.tar.gz| tar xz && \
161 mkdir -p /usr/include/dmd/druntime/import/deimos /usr/include/dmd/druntime/import/C && \
162 mv libevent-master/deimos/* openssl-master/deimos/* /usr/include/dmd/druntime/import/deimos/ && \
163 mv libevent-master/C/* openssl-master/C/* /usr/include/dmd/druntime/import/C/ && \
164 rm -rf libevent-master openssl-master && \
165 echo 'gcc -Wl,--no-as-needed $*' > /usr/local/bin/gcc-dmd && \
166 chmod 755 /usr/local/bin/gcc-dmd && \
167 echo 'CC=/usr/local/bin/gcc-dmd' >> /etc/dmd.conf
jfarrelle03f7e82015-02-18 23:25:54 -0500168
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +0900169# Dart dependencies
170RUN curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
171 curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list && \
172 apt-get update && apt-get install -y dart
173ENV PATH /usr/lib/dart/bin:$PATH
174
175# Lua dependencies
176RUN apt-get update && apt-get install -y \
177 lua5.2 \
178 lua5.2-dev
179
180# MinGW dependencies
181RUN apt-get update && apt-get install -y \
182 mingw32 \
183 mingw32-binutils \
184 mingw32-runtime \
185 nsis
186
jfarrelle03f7e82015-02-18 23:25:54 -0500187# Clean up
188RUN apt-get clean && \
189 rm -rf /var/cache/apt/* && \
190 rm -rf /var/lib/apt/lists/* && \
191 rm -rf /tmp/* && \
192 rm -rf /var/tmp/*
193
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +0900194ENV THRIFT_ROOT /thrift
195RUN mkdir -p $THRIFT_ROOT/src
196COPY scripts $THRIFT_ROOT
197WORKDIR $THRIFT_ROOT/src