blob: 469f026dda38209181588ad44371745c4506ae31 [file] [log] [blame]
jfarrelle03f7e82015-02-18 23:25:54 -05001# 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:
16# - None
17
18FROM ubuntu:trusty
19MAINTAINER Apache Thrift <dev@thrift.apache.org>
20
jfarrelle03f7e82015-02-18 23:25:54 -050021ENV DEBIAN_FRONTEND noninteractive
22
jfarrelle03f7e82015-02-18 23:25:54 -050023# General dependencies
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +090024RUN apt-get update && apt-get install -y --no-install-recommends \
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +090025 apt-transport-https \
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +090026 autoconf \
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +090027 automake \
28 bison \
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +090029 build-essential \
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +090030 clang \
31 cmake \
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +090032 curl \
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +090033 debhelper \
34 flex \
35 g++ \
36 git \
37 libtool \
38 make \
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +090039 ninja-build \
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +090040 pkg-config
jfarrelle03f7e82015-02-18 23:25:54 -050041
42# C++ dependencies
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +090043# libevent and OpenSSL are needed by D too
44RUN apt-get update && apt-get install -y --no-install-recommends \
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +090045 libboost-dev \
46 libboost-filesystem-dev \
47 libboost-program-options-dev \
48 libboost-system-dev \
49 libboost-test-dev \
50 libboost-thread-dev \
51 libevent-dev \
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +090052 libssl-dev \
53 qt5-default \
54 qtbase5-dev \
55 qtbase5-dev-tools
jfarrelle03f7e82015-02-18 23:25:54 -050056
57# Java dependencies
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +090058RUN apt-get update && apt-get install -y --no-install-recommends \
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +090059 ant \
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +090060 ant-optional \
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +090061 openjdk-7-jdk \
62 maven \
63 && update-java-alternatives -s java-1.7.0-openjdk-amd64
jfarrelle03f7e82015-02-18 23:25:54 -050064
65# Python dependencies
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +090066# TODO:
67# Install twisted and zope.interface via pip. we need twisted at ./configure time, otherwise
68# py.twisted tests are skipped.
Nobuaki Sukegawaed23b2b2016-02-28 13:47:44 +090069RUN apt-get update && apt-get install -y --no-install-recommends \
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +090070 python-all \
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +090071 python-all-dbg \
Nobuaki Sukegawaed23b2b2016-02-28 13:47:44 +090072 python-all-dev \
73 python-pip \
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +090074 python-setuptools \
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +090075 python-twisted \
76 python-zope.interface \
Nobuaki Sukegawaf43d0ca2016-03-25 09:22:16 +090077 python3-all \
78 python3-all-dbg \
79 python3-all-dev \
80 python3-setuptools \
Nobuaki Sukegawa25536ad2016-02-04 15:08:55 +090081 python3-pip
jfarrelle03f7e82015-02-18 23:25:54 -050082
83# Ruby dependencies
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +090084RUN apt-get update && apt-get install -y --no-install-recommends \
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +090085 ruby \
86 ruby-dev \
87 && gem install bundler rake
jfarrelle03f7e82015-02-18 23:25:54 -050088
89# Perl dependencies
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +090090RUN apt-get update && apt-get install -y --no-install-recommends \
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +090091 libbit-vector-perl \
92 libclass-accessor-class-perl \
93 libcrypt-ssleay-perl \
94 libio-socket-ssl-perl \
95 libnet-ssleay-perl
jfarrelle03f7e82015-02-18 23:25:54 -050096
97# Php dependencies
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +090098RUN apt-get update && apt-get install -y --no-install-recommends \
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +090099 php5 \
100 php5-dev \
101 php5-cli \
102 php-pear \
103 re2c \
104 phpunit
jfarrelle03f7e82015-02-18 23:25:54 -0500105
106# GlibC dependencies
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +0900107RUN apt-get update && apt-get install -y --no-install-recommends libglib2.0-dev
jfarrelle03f7e82015-02-18 23:25:54 -0500108
109# Erlang dependencies
jfarrellb2e90c12015-07-27 08:49:53 -0400110RUN echo 'deb http://packages.erlang-solutions.com/debian trusty contrib' > /etc/apt/sources.list.d/erlang_solutions.list && \
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +0900111 curl -sSL http://packages.erlang-solutions.com/debian/erlang_solutions.asc | apt-key add - && \
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +0900112 apt-get update && apt-get install -y --no-install-recommends \
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +0900113 erlang-base \
114 erlang-eunit \
115 erlang-dev \
116 erlang-tools \
117 rebar
jfarrelle03f7e82015-02-18 23:25:54 -0500118
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +0900119# Go dependencies
120RUN curl -sSL https://storage.googleapis.com/golang/go1.4.3.linux-amd64.tar.gz | tar -C /usr/local/ -xz
121ENV PATH /usr/local/go/bin:$PATH
jfarrell763841b2015-06-24 09:11:54 -0400122
jfarrelle03f7e82015-02-18 23:25:54 -0500123# Haskell dependencies
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +0900124RUN apt-get update && apt-get install -y --no-install-recommends \
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +0900125 ghc \
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +0900126 cabal-install
127# Packages tend to be overwritten by build process since we're currently calling cabal update
128# libghc-binary-dev \
129# libghc-network-dev \
130# libghc-http-dev \
131# libghc-hashable-dev \
132# libghc-unordered-containers-dev \
133# libghc-vector-dev
jfarrelle03f7e82015-02-18 23:25:54 -0500134
135# Haxe
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +0900136RUN apt-get update && apt-get install -y --no-install-recommends \
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +0900137 neko \
138 neko-dev \
139 libneko0 \
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +0900140 && mkdir -p /usr/lib/haxe && \
141 curl http://haxe.org/website-content/downloads/3.2.0/downloads/haxe-3.2.0-linux64.tar.gz | \
142 tar -C /usr/lib/haxe --strip-components=1 -xz && \
jfarrelle03f7e82015-02-18 23:25:54 -0500143 ln -s /usr/lib/haxe/haxe /usr/bin/haxe && \
144 ln -s /usr/lib/haxe/haxelib /usr/bin/haxelib && \
jfarrelle03f7e82015-02-18 23:25:54 -0500145 mkdir -p /usr/lib/haxe/lib && \
146 chmod -R 777 /usr/lib/haxe/lib && \
147 haxelib setup /usr/lib/haxe/lib && \
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +0900148 haxelib install hxcpp
jfarrelle03f7e82015-02-18 23:25:54 -0500149
150# Node.js dependencies
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +0900151RUN apt-get update && apt-get install -y --no-install-recommends \
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +0900152 nodejs \
153 nodejs-dev \
154 nodejs-legacy \
155 npm
jfarrelle03f7e82015-02-18 23:25:54 -0500156
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +0900157# CSharp dependencies
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +0900158RUN apt-get update && apt-get install -y --no-install-recommends \
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +0900159 libmono-system-web2.0-cil \
160 mono-complete \
161 mono-devel \
162 mono-gmcs \
163 mono-xbuild
jfarrelle03f7e82015-02-18 23:25:54 -0500164
165# D dependencies
Nobuaki Sukegawaeee04d92016-02-22 22:13:31 +0900166RUN apt-get update && apt-get install -y --no-install-recommends xdg-utils && \
167 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 +0900168 dpkg -i /tmp/dmd_2.070.0-0_amd64.deb && \
Nobuaki Sukegawaeee04d92016-02-22 22:13:31 +0900169 rm /tmp/dmd_2.070.0-0_amd64.deb && \
170 curl -sSL https://github.com/D-Programming-Deimos/openssl/archive/master.tar.gz| tar xz && \
171 curl -sSL https://github.com/D-Programming-Deimos/libevent/archive/master.tar.gz| tar xz && \
172 mkdir -p /usr/include/dmd/druntime/import/deimos /usr/include/dmd/druntime/import/C && \
173 mv libevent-master/deimos/* openssl-master/deimos/* /usr/include/dmd/druntime/import/deimos/ && \
174 mv libevent-master/C/* openssl-master/C/* /usr/include/dmd/druntime/import/C/ && \
175 rm -rf libevent-master openssl-master && \
176 echo 'gcc -Wl,--no-as-needed $*' > /usr/local/bin/gcc-dmd && \
177 chmod 755 /usr/local/bin/gcc-dmd && \
178 echo 'CC=/usr/local/bin/gcc-dmd' >> /etc/dmd.conf
jfarrelle03f7e82015-02-18 23:25:54 -0500179
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +0900180# Dart dependencies
181RUN curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
182 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 +0900183 apt-get update && apt-get install -y --no-install-recommends dart
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +0900184ENV PATH /usr/lib/dart/bin:$PATH
185
186# Lua dependencies
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +0900187RUN apt-get update && apt-get install -y --no-install-recommends \
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +0900188 lua5.2 \
189 lua5.2-dev
190
191# MinGW dependencies
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +0900192RUN apt-get update && apt-get install -y --no-install-recommends \
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +0900193 mingw32 \
194 mingw32-binutils \
195 mingw32-runtime \
196 nsis
197
jfarrelle03f7e82015-02-18 23:25:54 -0500198# Clean up
199RUN apt-get clean && \
200 rm -rf /var/cache/apt/* && \
201 rm -rf /var/lib/apt/lists/* && \
202 rm -rf /tmp/* && \
203 rm -rf /var/tmp/*
204
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +0900205ENV THRIFT_ROOT /thrift
206RUN mkdir -p $THRIFT_ROOT/src
207COPY scripts $THRIFT_ROOT
208WORKDIR $THRIFT_ROOT/src