blob: 66a52d7242bda30f9dbdb0163475b2bc1e798c1a [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 \
Roger Meier447294f2015-12-11 00:04:41 +010069 python-twisted \
70 python-zope.interface \
Nobuaki Sukegawa25536ad2016-02-04 15:08:55 +090071 python-pip \
Nobuaki Sukegawaf43d0ca2016-03-25 09:22:16 +090072 python3-all \
73 python3-all-dbg \
74 python3-all-dev \
75 python3-setuptools \
Nobuaki Sukegawa25536ad2016-02-04 15:08:55 +090076 python3-pip
Roger Meier447294f2015-12-11 00:04:41 +010077
78# Ruby dependencies
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +090079RUN apt-get update && apt-get install -y --no-install-recommends \
Roger Meier447294f2015-12-11 00:04:41 +010080 ruby \
81 ruby-dev \
82 && gem install bundler rake
83
84# Perl dependencies
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +090085RUN apt-get update && apt-get install -y --no-install-recommends \
Roger Meier447294f2015-12-11 00:04:41 +010086 libbit-vector-perl \
87 libclass-accessor-class-perl \
88 libcrypt-ssleay-perl \
89 libio-socket-ssl-perl \
90 libnet-ssleay-perl
91
92# Php dependencies
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +090093RUN apt-get update && apt-get install -y --no-install-recommends \
Roger Meier447294f2015-12-11 00:04:41 +010094 php5 \
95 php5-dev \
96 php5-cli \
97 php-pear \
98 re2c \
99 phpunit
100
101# GlibC dependencies
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +0900102RUN apt-get update && apt-get install -y --no-install-recommends libglib2.0-dev
Roger Meier447294f2015-12-11 00:04:41 +0100103
104# Erlang dependencies
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +0900105RUN apt-get update && apt-get install -y --no-install-recommends \
Roger Meier447294f2015-12-11 00:04:41 +0100106 erlang-base \
107 erlang-eunit \
108 erlang-dev \
109 erlang-tools \
110 rebar
111
112# Go dependencies
113RUN curl -sSL https://storage.googleapis.com/golang/go1.4.3.linux-amd64.tar.gz | tar -C /usr/local/ -xz
114ENV PATH /usr/local/go/bin:$PATH
115
116
117# Haskell dependencies
Nobuaki Sukegawadd2223c2016-02-22 21:02:37 +0900118RUN apt-get update && apt-get install -y --no-install-recommends \
119 ghc \
120 cabal-install
Roger Meier447294f2015-12-11 00:04:41 +0100121
122# Haxe
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +0900123RUN apt-get update && apt-get install -y --no-install-recommends \
Roger Meier447294f2015-12-11 00:04:41 +0100124 neko \
125 neko-dev \
126 libneko0 \
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +0900127 && mkdir -p /usr/lib/haxe && \
128 curl http://haxe.org/website-content/downloads/3.2.0/downloads/haxe-3.2.0-linux64.tar.gz | \
129 tar -C /usr/lib/haxe --strip-components=1 -xz && \
Roger Meier447294f2015-12-11 00:04:41 +0100130 ln -s /usr/lib/haxe/haxe /usr/bin/haxe && \
131 ln -s /usr/lib/haxe/haxelib /usr/bin/haxelib && \
132 mkdir -p /usr/lib/haxe/lib && \
133 chmod -R 777 /usr/lib/haxe/lib && \
134 haxelib setup /usr/lib/haxe/lib && \
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +0900135 haxelib install hxcpp
Roger Meier447294f2015-12-11 00:04:41 +0100136
137# Node.js dependencies
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +0900138RUN apt-get update && apt-get install -y --no-install-recommends \
Roger Meier447294f2015-12-11 00:04:41 +0100139 nodejs \
140 nodejs-dev \
141 nodejs-legacy \
142 npm
143
144# CSharp dependencies
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +0900145RUN apt-get update && apt-get install -y --no-install-recommends \
Roger Meier447294f2015-12-11 00:04:41 +0100146 libmono-system-web2.0-cil \
147 mono-complete \
148 mono-devel \
149 mono-gmcs \
150 mono-xbuild
151
152# D dependencies
Nobuaki Sukegawaeee04d92016-02-22 22:13:31 +0900153RUN apt-get update && apt-get install -y --no-install-recommends xdg-utils && \
154 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 +0900155 dpkg -i /tmp/dmd_2.070.0-0_amd64.deb && \
Nobuaki Sukegawaeee04d92016-02-22 22:13:31 +0900156 rm /tmp/dmd_2.070.0-0_amd64.deb && \
157 curl -sSL https://github.com/D-Programming-Deimos/openssl/archive/master.tar.gz| tar xz && \
158 curl -sSL https://github.com/D-Programming-Deimos/libevent/archive/master.tar.gz| tar xz && \
159 mkdir -p /usr/include/dmd/druntime/import/deimos /usr/include/dmd/druntime/import/C && \
160 mv libevent-master/deimos/* openssl-master/deimos/* /usr/include/dmd/druntime/import/deimos/ && \
161 mv libevent-master/C/* openssl-master/C/* /usr/include/dmd/druntime/import/C/ && \
162 rm -rf libevent-master openssl-master && \
163 echo 'gcc -Wl,--no-as-needed $*' > /usr/local/bin/gcc-dmd && \
164 chmod 755 /usr/local/bin/gcc-dmd && \
165 echo 'CC=/usr/local/bin/gcc-dmd' >> /etc/dmd.conf
Roger Meier447294f2015-12-11 00:04:41 +0100166
167# Dart dependencies
168RUN curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
169 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 +0900170 apt-get update && apt-get install -y --no-install-recommends dart
Roger Meier447294f2015-12-11 00:04:41 +0100171ENV PATH /usr/lib/dart/bin:$PATH
172
173# Lua dependencies
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +0900174RUN apt-get update && apt-get install -y --no-install-recommends \
Roger Meier447294f2015-12-11 00:04:41 +0100175 lua5.2 \
176 lua5.2-dev
177
178# MinGW dependencies
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +0900179RUN apt-get update && apt-get install -y --no-install-recommends \
Roger Meier447294f2015-12-11 00:04:41 +0100180 mingw32 \
181 mingw32-binutils \
182# mingw32-runtime \
183 nsis
184
185# Clean up
186RUN apt-get clean && \
187 rm -rf /var/cache/apt/* && \
188 rm -rf /var/lib/apt/lists/* && \
189 rm -rf /tmp/* && \
190 rm -rf /var/tmp/*
191
Nobuaki Sukegawadd2223c2016-02-22 21:02:37 +0900192# Force utf8 locale to successfully build Haskell tf-random
193ENV LC_ALL C.UTF-8
194
Roger Meier447294f2015-12-11 00:04:41 +0100195ENV THRIFT_ROOT /thrift
196RUN mkdir -p $THRIFT_ROOT/src
197COPY scripts $THRIFT_ROOT
198WORKDIR $THRIFT_ROOT/src