blob: d8c241159c8c4862babd7b9761dd25b65896bc1c [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
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +090024RUN apt-get update && apt-get install -y --no-install-recommends \
Roger Meier447294f2015-12-11 00:04:41 +010025 apt-transport-https \
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +090026 autoconf \
Roger Meier447294f2015-12-11 00:04:41 +010027 automake \
28 bison \
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +090029 build-essential \
Roger Meier447294f2015-12-11 00:04:41 +010030 clang \
31 cmake \
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +090032 curl \
Roger Meier447294f2015-12-11 00:04:41 +010033 debhelper \
34 flex \
35 g++ \
36 git \
37 libtool \
38 make \
39 pkg-config
40
41# C++ dependencies
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +090042RUN apt-get update && apt-get install -y --no-install-recommends \
Roger Meier447294f2015-12-11 00:04:41 +010043 libboost-dev \
44 libboost-filesystem-dev \
45 libboost-program-options-dev \
46 libboost-system-dev \
47 libboost-test-dev \
48 libboost-thread-dev \
49 libevent-dev \
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +090050 libssl-dev \
51 qt5-default \
52 qtbase5-dev \
53 qtbase5-dev-tools
Roger Meier447294f2015-12-11 00:04:41 +010054
55# Java dependencies
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +090056RUN apt-get update && apt-get install -y --no-install-recommends \
Roger Meier447294f2015-12-11 00:04:41 +010057 ant \
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +090058 ant-optional \
Roger Meier447294f2015-12-11 00:04:41 +010059 openjdk-7-jdk \
60 maven \
61 && update-java-alternatives -s java-1.7.0-openjdk-amd64
62
63# Python dependencies
Nobuaki Sukegawaed23b2b2016-02-28 13:47:44 +090064RUN apt-get update && apt-get install -y --no-install-recommends \
Roger Meier447294f2015-12-11 00:04:41 +010065 python-all \
66 python-all-dev \
67 python-all-dbg \
68 python-setuptools \
69 python-support \
70 python-twisted \
71 python-zope.interface \
Nobuaki Sukegawa25536ad2016-02-04 15:08:55 +090072 python-pip \
Nobuaki Sukegawaed23b2b2016-02-28 13:47:44 +090073 python3-dev \
Nobuaki Sukegawa25536ad2016-02-04 15:08:55 +090074 python3-pip
Roger Meier447294f2015-12-11 00:04:41 +010075
76# Ruby dependencies
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +090077RUN apt-get update && apt-get install -y --no-install-recommends \
Roger Meier447294f2015-12-11 00:04:41 +010078 ruby \
79 ruby-dev \
80 && gem install bundler rake
81
82# Perl dependencies
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +090083RUN apt-get update && apt-get install -y --no-install-recommends \
Roger Meier447294f2015-12-11 00:04:41 +010084 libbit-vector-perl \
85 libclass-accessor-class-perl \
86 libcrypt-ssleay-perl \
87 libio-socket-ssl-perl \
88 libnet-ssleay-perl
89
90# Php dependencies
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +090091RUN apt-get update && apt-get install -y --no-install-recommends \
Roger Meier447294f2015-12-11 00:04:41 +010092 php5 \
93 php5-dev \
94 php5-cli \
95 php-pear \
96 re2c \
97 phpunit
98
99# GlibC dependencies
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +0900100RUN apt-get update && apt-get install -y --no-install-recommends libglib2.0-dev
Roger Meier447294f2015-12-11 00:04:41 +0100101
102# Erlang dependencies
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +0900103RUN apt-get update && apt-get install -y --no-install-recommends \
Roger Meier447294f2015-12-11 00:04:41 +0100104 erlang-base \
105 erlang-eunit \
106 erlang-dev \
107 erlang-tools \
108 rebar
109
110# Go dependencies
111RUN curl -sSL https://storage.googleapis.com/golang/go1.4.3.linux-amd64.tar.gz | tar -C /usr/local/ -xz
112ENV PATH /usr/local/go/bin:$PATH
113
114
115# Haskell dependencies
Nobuaki Sukegawadd2223c2016-02-22 21:02:37 +0900116RUN apt-get update && apt-get install -y --no-install-recommends \
117 ghc \
118 cabal-install
Roger Meier447294f2015-12-11 00:04:41 +0100119
120# Haxe
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +0900121RUN apt-get update && apt-get install -y --no-install-recommends \
Roger Meier447294f2015-12-11 00:04:41 +0100122 neko \
123 neko-dev \
124 libneko0 \
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +0900125 && mkdir -p /usr/lib/haxe && \
126 curl http://haxe.org/website-content/downloads/3.2.0/downloads/haxe-3.2.0-linux64.tar.gz | \
127 tar -C /usr/lib/haxe --strip-components=1 -xz && \
Roger Meier447294f2015-12-11 00:04:41 +0100128 ln -s /usr/lib/haxe/haxe /usr/bin/haxe && \
129 ln -s /usr/lib/haxe/haxelib /usr/bin/haxelib && \
130 mkdir -p /usr/lib/haxe/lib && \
131 chmod -R 777 /usr/lib/haxe/lib && \
132 haxelib setup /usr/lib/haxe/lib && \
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +0900133 haxelib install hxcpp
Roger Meier447294f2015-12-11 00:04:41 +0100134
135# Node.js dependencies
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +0900136RUN apt-get update && apt-get install -y --no-install-recommends \
Roger Meier447294f2015-12-11 00:04:41 +0100137 nodejs \
138 nodejs-dev \
139 nodejs-legacy \
140 npm
141
142# CSharp dependencies
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +0900143RUN apt-get update && apt-get install -y --no-install-recommends \
Roger Meier447294f2015-12-11 00:04:41 +0100144 libmono-system-web2.0-cil \
145 mono-complete \
146 mono-devel \
147 mono-gmcs \
148 mono-xbuild
149
150# D dependencies
Nobuaki Sukegawaeee04d92016-02-22 22:13:31 +0900151RUN apt-get update && apt-get install -y --no-install-recommends xdg-utils && \
152 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 +0900153 dpkg -i /tmp/dmd_2.070.0-0_amd64.deb && \
Nobuaki Sukegawaeee04d92016-02-22 22:13:31 +0900154 rm /tmp/dmd_2.070.0-0_amd64.deb && \
155 curl -sSL https://github.com/D-Programming-Deimos/openssl/archive/master.tar.gz| tar xz && \
156 curl -sSL https://github.com/D-Programming-Deimos/libevent/archive/master.tar.gz| tar xz && \
157 mkdir -p /usr/include/dmd/druntime/import/deimos /usr/include/dmd/druntime/import/C && \
158 mv libevent-master/deimos/* openssl-master/deimos/* /usr/include/dmd/druntime/import/deimos/ && \
159 mv libevent-master/C/* openssl-master/C/* /usr/include/dmd/druntime/import/C/ && \
160 rm -rf libevent-master openssl-master && \
161 echo 'gcc -Wl,--no-as-needed $*' > /usr/local/bin/gcc-dmd && \
162 chmod 755 /usr/local/bin/gcc-dmd && \
163 echo 'CC=/usr/local/bin/gcc-dmd' >> /etc/dmd.conf
Roger Meier447294f2015-12-11 00:04:41 +0100164
165# Dart dependencies
166RUN curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
167 curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list && \
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +0900168 apt-get update && apt-get install -y --no-install-recommends dart
Roger Meier447294f2015-12-11 00:04:41 +0100169ENV PATH /usr/lib/dart/bin:$PATH
170
171# Lua dependencies
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +0900172RUN apt-get update && apt-get install -y --no-install-recommends \
Roger Meier447294f2015-12-11 00:04:41 +0100173 lua5.2 \
174 lua5.2-dev
175
176# MinGW dependencies
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +0900177RUN apt-get update && apt-get install -y --no-install-recommends \
Roger Meier447294f2015-12-11 00:04:41 +0100178 mingw32 \
179 mingw32-binutils \
180# mingw32-runtime \
181 nsis
182
183# Clean up
184RUN apt-get clean && \
185 rm -rf /var/cache/apt/* && \
186 rm -rf /var/lib/apt/lists/* && \
187 rm -rf /tmp/* && \
188 rm -rf /var/tmp/*
189
Nobuaki Sukegawadd2223c2016-02-22 21:02:37 +0900190# Force utf8 locale to successfully build Haskell tf-random
191ENV LC_ALL C.UTF-8
192
Roger Meier447294f2015-12-11 00:04:41 +0100193ENV THRIFT_ROOT /thrift
194RUN mkdir -p $THRIFT_ROOT/src
195COPY scripts $THRIFT_ROOT
196WORKDIR $THRIFT_ROOT/src