blob: 99eda7ab9028736ee58afeb298db89a90fd17416 [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 \
Nobuaki Sukegawa080041c2016-09-04 18:49:19 +0900124 mono-devel
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +0900125
126RUN apt-get update && apt-get install -y --no-install-recommends \
127`# D dependencies` \
128 xdg-utils \
129`# Dart dependencies` \
130 dart \
131`# Lua dependencies` \
132 lua5.2 \
133 lua5.2-dev \
134`# MinGW dependencies` \
135 mingw32 \
136 mingw32-binutils \
137`# mingw32-runtime` \
138 nsis \
139`# Clean up` \
140 && rm -rf /var/cache/apt/* && \
141 rm -rf /var/lib/apt/lists/* && \
142 rm -rf /tmp/* && \
143 rm -rf /var/tmp/*
144
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +0900145# Ruby
Nobuaki Sukegawa080041c2016-09-04 18:49:19 +0900146RUN gem install bundler --no-ri --no-rdoc
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +0900147
Nobuaki Sukegawabf9fa902016-09-04 18:49:21 +0900148# Python optional dependencies
149RUN pip2 install -U ipaddress backports.ssl_match_hostname tornado
150RUN pip3 install -U backports.ssl_match_hostname tornado
151
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +0900152# Go
Roger Meier447294f2015-12-11 00:04:41 +0100153RUN curl -sSL https://storage.googleapis.com/golang/go1.4.3.linux-amd64.tar.gz | tar -C /usr/local/ -xz
154ENV PATH /usr/local/go/bin:$PATH
155
Roger Meier447294f2015-12-11 00:04:41 +0100156# Haxe
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +0900157RUN mkdir -p /usr/lib/haxe && \
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +0900158 curl http://haxe.org/website-content/downloads/3.2.0/downloads/haxe-3.2.0-linux64.tar.gz | \
159 tar -C /usr/lib/haxe --strip-components=1 -xz && \
Roger Meier447294f2015-12-11 00:04:41 +0100160 ln -s /usr/lib/haxe/haxe /usr/bin/haxe && \
161 ln -s /usr/lib/haxe/haxelib /usr/bin/haxelib && \
162 mkdir -p /usr/lib/haxe/lib && \
163 chmod -R 777 /usr/lib/haxe/lib && \
164 haxelib setup /usr/lib/haxe/lib && \
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +0900165 haxelib install hxcpp
Roger Meier447294f2015-12-11 00:04:41 +0100166
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +0900167# D
168RUN 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 +0900169 dpkg -i /tmp/dmd_2.070.0-0_amd64.deb && \
Nobuaki Sukegawaeee04d92016-02-22 22:13:31 +0900170 rm /tmp/dmd_2.070.0-0_amd64.deb && \
171 curl -sSL https://github.com/D-Programming-Deimos/openssl/archive/master.tar.gz| tar xz && \
172 curl -sSL https://github.com/D-Programming-Deimos/libevent/archive/master.tar.gz| tar xz && \
173 mkdir -p /usr/include/dmd/druntime/import/deimos /usr/include/dmd/druntime/import/C && \
174 mv libevent-master/deimos/* openssl-master/deimos/* /usr/include/dmd/druntime/import/deimos/ && \
175 mv libevent-master/C/* openssl-master/C/* /usr/include/dmd/druntime/import/C/ && \
176 rm -rf libevent-master openssl-master && \
177 echo 'gcc -Wl,--no-as-needed $*' > /usr/local/bin/gcc-dmd && \
178 chmod 755 /usr/local/bin/gcc-dmd && \
179 echo 'CC=/usr/local/bin/gcc-dmd' >> /etc/dmd.conf
Roger Meier447294f2015-12-11 00:04:41 +0100180
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +0900181# Dart
Roger Meier447294f2015-12-11 00:04:41 +0100182ENV PATH /usr/lib/dart/bin:$PATH
183
Nobuaki Sukegawadd2223c2016-02-22 21:02:37 +0900184# Force utf8 locale to successfully build Haskell tf-random
185ENV LC_ALL C.UTF-8
186
Roger Meier447294f2015-12-11 00:04:41 +0100187ENV THRIFT_ROOT /thrift
188RUN mkdir -p $THRIFT_ROOT/src
Nobuaki Sukegawa93fb7ea2016-09-04 17:00:11 +0900189COPY Dockerfile $THRIFT_ROOT/
Roger Meier447294f2015-12-11 00:04:41 +0100190WORKDIR $THRIFT_ROOT/src