blob: 7c151091e7a1f60b42e1690963a69186cad2df9a [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
Roger Meiere0ccbd62017-01-16 20:26:57 +010086RUN echo "deb http://ftp.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/jessie-backports.list
87RUN apt-get update && apt-get -t jessie-backports install -y ruby-bundler
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +090088RUN apt-get update && apt-get install -y --no-install-recommends \
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +090089`# Php dependencies` \
Roger Meier447294f2015-12-11 00:04:41 +010090 php5 \
91 php5-dev \
92 php5-cli \
93 php-pear \
94 re2c \
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +090095 phpunit \
96`# GlibC dependencies` \
97 libglib2.0-dev
Roger Meier447294f2015-12-11 00:04:41 +010098
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +090099RUN apt-get update && apt-get install -y --no-install-recommends \
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +0900100`# Erlang dependencies` \
Roger Meier447294f2015-12-11 00:04:41 +0100101 erlang-base \
102 erlang-eunit \
103 erlang-dev \
104 erlang-tools \
105 rebar
106
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +0900107RUN apt-get update && apt-get install -y --no-install-recommends \
108`# Haskell dependencies` \
109 ghc \
110 cabal-install \
111`# Haxe dependencies` \
112 neko \
113 neko-dev \
114 libneko0
115
116RUN apt-get update && apt-get install -y --no-install-recommends \
117`# Node.js dependencies` \
118 nodejs \
119 nodejs-dev \
120 nodejs-legacy \
121 npm
122
123RUN apt-get update && apt-get install -y --no-install-recommends \
124`# CSharp dependencies` \
125 libmono-system-web2.0-cil \
Nobuaki Sukegawa080041c2016-09-04 18:49:19 +0900126 mono-devel
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +0900127
128RUN apt-get update && apt-get install -y --no-install-recommends \
129`# D dependencies` \
130 xdg-utils \
131`# Dart dependencies` \
132 dart \
133`# Lua dependencies` \
134 lua5.2 \
135 lua5.2-dev \
136`# MinGW dependencies` \
137 mingw32 \
138 mingw32-binutils \
139`# mingw32-runtime` \
140 nsis \
141`# Clean up` \
142 && rm -rf /var/cache/apt/* && \
143 rm -rf /var/lib/apt/lists/* && \
144 rm -rf /tmp/* && \
145 rm -rf /var/tmp/*
146
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +0900147# Ruby
Nobuaki Sukegawa080041c2016-09-04 18:49:19 +0900148RUN gem install bundler --no-ri --no-rdoc
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +0900149
Nobuaki Sukegawabf9fa902016-09-04 18:49:21 +0900150# Python optional dependencies
151RUN pip2 install -U ipaddress backports.ssl_match_hostname tornado
152RUN pip3 install -U backports.ssl_match_hostname tornado
153
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +0900154# 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
Nobuaki Sukegawa93fb7ea2016-09-04 17:00:11 +0900191COPY Dockerfile $THRIFT_ROOT/
Roger Meier447294f2015-12-11 00:04:41 +0100192WORKDIR $THRIFT_ROOT/src