blob: 5ec956ebca7fec4f294367102edbf20fabab8ddf [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
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +090018FROM buildpack-deps:jessie-scm
Roger Meier447294f2015-12-11 00:04:41 +010019MAINTAINER Apache Thrift <dev@thrift.apache.org>
20
21ENV DEBIAN_FRONTEND noninteractive
22
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +090023# Add apt sources
24# Dart
25RUN curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
26 curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list && \
27 sed -i /etc/apt/sources.list.d/dart_stable.list -e 's/https:/http:/g'
28
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +090029RUN apt-get update && apt-get install -y --no-install-recommends \
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +090030`# General dependencies` \
Roger Meier447294f2015-12-11 00:04:41 +010031 bison \
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +090032 build-essential \
Roger Meier447294f2015-12-11 00:04:41 +010033 clang \
34 cmake \
35 debhelper \
36 flex \
Roger Meier447294f2015-12-11 00:04:41 +010037 pkg-config
38
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +090039RUN apt-get update && apt-get install -y --no-install-recommends \
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +090040`# C++ dependencies` \
Roger Meier447294f2015-12-11 00:04:41 +010041 libboost-dev \
42 libboost-filesystem-dev \
43 libboost-program-options-dev \
44 libboost-system-dev \
45 libboost-test-dev \
46 libboost-thread-dev \
47 libevent-dev \
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +090048 libssl-dev \
49 qt5-default \
50 qtbase5-dev \
51 qtbase5-dev-tools
Roger Meier447294f2015-12-11 00:04:41 +010052
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +090053RUN apt-get update && apt-get install -y --no-install-recommends \
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +090054`# Java dependencies` \
Roger Meier447294f2015-12-11 00:04:41 +010055 ant \
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +090056 ant-optional \
Roger Meier447294f2015-12-11 00:04:41 +010057 openjdk-7-jdk \
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +090058 maven
Roger Meier447294f2015-12-11 00:04:41 +010059
Nobuaki Sukegawaed23b2b2016-02-28 13:47:44 +090060RUN apt-get update && apt-get install -y --no-install-recommends \
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +090061`# Python dependencies` \
Roger Meier447294f2015-12-11 00:04:41 +010062 python-all \
Roger Meier447294f2015-12-11 00:04:41 +010063 python-all-dbg \
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +090064 python-all-dev \
65 python-pip \
Roger Meier447294f2015-12-11 00:04:41 +010066 python-setuptools \
Roger Meier447294f2015-12-11 00:04:41 +010067 python-twisted \
68 python-zope.interface \
Nobuaki Sukegawaf43d0ca2016-03-25 09:22:16 +090069 python3-all \
70 python3-all-dbg \
71 python3-all-dev \
72 python3-setuptools \
Nobuaki Sukegawa25536ad2016-02-04 15:08:55 +090073 python3-pip
Roger Meier447294f2015-12-11 00:04:41 +010074
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +090075RUN apt-get update && apt-get install -y --no-install-recommends \
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +090076`# Ruby dependencies` \
Roger Meier447294f2015-12-11 00:04:41 +010077 ruby \
78 ruby-dev \
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +090079`# Perl dependencies` \
Roger Meier447294f2015-12-11 00:04:41 +010080 libbit-vector-perl \
81 libclass-accessor-class-perl \
82 libcrypt-ssleay-perl \
83 libio-socket-ssl-perl \
84 libnet-ssleay-perl
85
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +090086RUN apt-get update && apt-get install -y --no-install-recommends \
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +090087`# Php dependencies` \
Roger Meier447294f2015-12-11 00:04:41 +010088 php5 \
89 php5-dev \
90 php5-cli \
91 php-pear \
92 re2c \
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +090093 phpunit \
94`# GlibC dependencies` \
95 libglib2.0-dev
Roger Meier447294f2015-12-11 00:04:41 +010096
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +090097RUN apt-get update && apt-get install -y --no-install-recommends \
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +090098`# Erlang dependencies` \
Roger Meier447294f2015-12-11 00:04:41 +010099 erlang-base \
100 erlang-eunit \
101 erlang-dev \
102 erlang-tools \
103 rebar
104
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +0900105RUN apt-get update && apt-get install -y --no-install-recommends \
106`# Haskell dependencies` \
107 ghc \
108 cabal-install \
109`# Haxe dependencies` \
110 neko \
111 neko-dev \
112 libneko0
113
114RUN apt-get update && apt-get install -y --no-install-recommends \
115`# Node.js dependencies` \
116 nodejs \
117 nodejs-dev \
118 nodejs-legacy \
119 npm
120
121RUN apt-get update && apt-get install -y --no-install-recommends \
122`# CSharp dependencies` \
123 libmono-system-web2.0-cil \
124 mono-complete \
125 mono-devel \
126 mono-gmcs \
127 mono-xbuild
128
129RUN apt-get update && apt-get install -y --no-install-recommends \
130`# D dependencies` \
131 xdg-utils \
132`# Dart dependencies` \
133 dart \
134`# Lua dependencies` \
135 lua5.2 \
136 lua5.2-dev \
137`# MinGW dependencies` \
138 mingw32 \
139 mingw32-binutils \
140`# mingw32-runtime` \
141 nsis \
142`# Clean up` \
143 && rm -rf /var/cache/apt/* && \
144 rm -rf /var/lib/apt/lists/* && \
145 rm -rf /tmp/* && \
146 rm -rf /var/tmp/*
147
148# Java
149RUN update-java-alternatives -s java-1.7.0-openjdk-amd64
150
151# Ruby
152RUN gem install bundler rake
153
154# Go
Roger Meier447294f2015-12-11 00:04:41 +0100155RUN curl -sSL https://storage.googleapis.com/golang/go1.4.3.linux-amd64.tar.gz | tar -C /usr/local/ -xz
156ENV PATH /usr/local/go/bin:$PATH
157
Roger Meier447294f2015-12-11 00:04:41 +0100158# Haxe
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +0900159RUN mkdir -p /usr/lib/haxe && \
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +0900160 curl http://haxe.org/website-content/downloads/3.2.0/downloads/haxe-3.2.0-linux64.tar.gz | \
161 tar -C /usr/lib/haxe --strip-components=1 -xz && \
Roger Meier447294f2015-12-11 00:04:41 +0100162 ln -s /usr/lib/haxe/haxe /usr/bin/haxe && \
163 ln -s /usr/lib/haxe/haxelib /usr/bin/haxelib && \
164 mkdir -p /usr/lib/haxe/lib && \
165 chmod -R 777 /usr/lib/haxe/lib && \
166 haxelib setup /usr/lib/haxe/lib && \
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +0900167 haxelib install hxcpp
Roger Meier447294f2015-12-11 00:04:41 +0100168
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +0900169# D
170RUN 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 +0900171 dpkg -i /tmp/dmd_2.070.0-0_amd64.deb && \
Nobuaki Sukegawaeee04d92016-02-22 22:13:31 +0900172 rm /tmp/dmd_2.070.0-0_amd64.deb && \
173 curl -sSL https://github.com/D-Programming-Deimos/openssl/archive/master.tar.gz| tar xz && \
174 curl -sSL https://github.com/D-Programming-Deimos/libevent/archive/master.tar.gz| tar xz && \
175 mkdir -p /usr/include/dmd/druntime/import/deimos /usr/include/dmd/druntime/import/C && \
176 mv libevent-master/deimos/* openssl-master/deimos/* /usr/include/dmd/druntime/import/deimos/ && \
177 mv libevent-master/C/* openssl-master/C/* /usr/include/dmd/druntime/import/C/ && \
178 rm -rf libevent-master openssl-master && \
179 echo 'gcc -Wl,--no-as-needed $*' > /usr/local/bin/gcc-dmd && \
180 chmod 755 /usr/local/bin/gcc-dmd && \
181 echo 'CC=/usr/local/bin/gcc-dmd' >> /etc/dmd.conf
Roger Meier447294f2015-12-11 00:04:41 +0100182
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +0900183# Dart
Roger Meier447294f2015-12-11 00:04:41 +0100184ENV PATH /usr/lib/dart/bin:$PATH
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