blob: 55c6a02cb37ead082b96420d509870788abb93ca [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 Sukegawaa6ab1f52015-11-28 15:04:39 +090058RUN apt-get update && apt-get install -y \
59 python-all \
60 python-all-dev \
61 python-all-dbg \
62 python-setuptools \
63 python-support \
64 python-twisted \
65 python-zope.interface \
66 python-six \
67 python3-six
jfarrelle03f7e82015-02-18 23:25:54 -050068
69# Ruby dependencies
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +090070RUN apt-get update && apt-get install -y \
71 ruby \
72 ruby-dev \
73 && gem install bundler rake
jfarrelle03f7e82015-02-18 23:25:54 -050074
75# Perl dependencies
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +090076RUN apt-get update && apt-get install -y \
77 libbit-vector-perl \
78 libclass-accessor-class-perl \
79 libcrypt-ssleay-perl \
80 libio-socket-ssl-perl \
81 libnet-ssleay-perl
jfarrelle03f7e82015-02-18 23:25:54 -050082
83# Php dependencies
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +090084RUN apt-get update && apt-get install -y \
85 php5 \
86 php5-dev \
87 php5-cli \
88 php-pear \
89 re2c \
90 phpunit
jfarrelle03f7e82015-02-18 23:25:54 -050091
92# GlibC dependencies
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +090093RUN apt-get update && apt-get install -y libglib2.0-dev
jfarrelle03f7e82015-02-18 23:25:54 -050094
95# Erlang dependencies
jfarrellb2e90c12015-07-27 08:49:53 -040096RUN 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 +090097 curl -sSL http://packages.erlang-solutions.com/debian/erlang_solutions.asc | apt-key add - && \
98 apt-get update && apt-get install -y \
99 erlang-base \
100 erlang-eunit \
101 erlang-dev \
102 erlang-tools \
103 rebar
jfarrelle03f7e82015-02-18 23:25:54 -0500104
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +0900105# Go dependencies
106RUN curl -sSL https://storage.googleapis.com/golang/go1.4.3.linux-amd64.tar.gz | tar -C /usr/local/ -xz
107ENV PATH /usr/local/go/bin:$PATH
jfarrell763841b2015-06-24 09:11:54 -0400108
jfarrelle03f7e82015-02-18 23:25:54 -0500109
110# Haskell dependencies
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +0900111RUN apt-get update && apt-get install -y \
112 ghc \
113 cabal-install \
114 libghc-binary-dev \
115 libghc-network-dev \
116 libghc-http-dev \
117 libghc-hashable-dev \
118 libghc-unordered-containers-dev \
119 libghc-vector-dev
jfarrelle03f7e82015-02-18 23:25:54 -0500120
121# Haxe
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +0900122RUN apt-get update && apt-get install -y \
123 neko \
124 neko-dev \
125 libneko0 \
126 && mkdir -p /tmp/haxe /usr/lib/haxe && \
jfarrellb2e90c12015-07-27 08:49:53 -0400127 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 && \
128 tar -xvzf /tmp/haxe/haxe-3.2.0-linux64.tar.gz -C /usr/lib/haxe --strip-components=1 && \
jfarrelle03f7e82015-02-18 23:25:54 -0500129 ln -s /usr/lib/haxe/haxe /usr/bin/haxe && \
130 ln -s /usr/lib/haxe/haxelib /usr/bin/haxelib && \
jfarrelle03f7e82015-02-18 23:25:54 -0500131 mkdir -p /usr/lib/haxe/lib && \
132 chmod -R 777 /usr/lib/haxe/lib && \
133 haxelib setup /usr/lib/haxe/lib && \
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +0900134 haxelib install hxcpp && \
135 rm -rf /tmp/haxe
jfarrelle03f7e82015-02-18 23:25:54 -0500136
jfarrelle03f7e82015-02-18 23:25:54 -0500137
138# Node.js dependencies
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +0900139RUN apt-get update && apt-get install -y \
140 nodejs \
141 nodejs-dev \
142 nodejs-legacy \
143 npm
jfarrelle03f7e82015-02-18 23:25:54 -0500144
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +0900145# CSharp dependencies
146RUN apt-get update && apt-get install -y \
147 libmono-system-web2.0-cil \
148 mono-complete \
149 mono-devel \
150 mono-gmcs \
151 mono-xbuild
jfarrelle03f7e82015-02-18 23:25:54 -0500152
153# D dependencies
154# THRIFT-2916: DMD pinned to 2.065.0-0 due to regression in 2.066
jfarrellb2e90c12015-07-27 08:49:53 -0400155# THRIFT-3253: DMD pinned to 2.065.0-0 due to deprecations 2.067.1
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +0900156RUN apt-get update && apt-get install -y \
157 gcc-multilib \
158 xdg-utils \
159 && curl -sSL http://downloads.dlang.org/releases/2.x/2.065.0/dmd_2.065.0-0_amd64.deb -o /tmp/dmd_2.065.0-0_amd64.deb && \
jfarrellb2e90c12015-07-27 08:49:53 -0400160 dpkg -i /tmp/dmd_2.065.0-0_amd64.deb && \
161 rm /tmp/dmd_2.065.0-0_amd64.deb
jfarrelle03f7e82015-02-18 23:25:54 -0500162
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +0900163# Dart dependencies
164RUN curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
165 curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list && \
166 apt-get update && apt-get install -y dart
167ENV PATH /usr/lib/dart/bin:$PATH
168
169# Lua dependencies
170RUN apt-get update && apt-get install -y \
171 lua5.2 \
172 lua5.2-dev
173
174# MinGW dependencies
175RUN apt-get update && apt-get install -y \
176 mingw32 \
177 mingw32-binutils \
178 mingw32-runtime \
179 nsis
180
jfarrelle03f7e82015-02-18 23:25:54 -0500181# Clean up
182RUN apt-get clean && \
183 rm -rf /var/cache/apt/* && \
184 rm -rf /var/lib/apt/lists/* && \
185 rm -rf /tmp/* && \
186 rm -rf /var/tmp/*
187
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +0900188ENV THRIFT_ROOT /thrift
189RUN mkdir -p $THRIFT_ROOT/src
190COPY scripts $THRIFT_ROOT
191WORKDIR $THRIFT_ROOT/src