blob: a49b2078c5dd185096e6b36340c0e3405941d9fc [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
James E. King, III43e959b2017-04-04 13:04:29 -040013# Apache Thrift Docker build environment for Debian
Roger Meier447294f2015-12-11 00:04:41 +010014#
15# Known missing client libraries:
James E. King, III43e959b2017-04-04 13:04:29 -040016# - dotnetcore
17# - rust
Roger Meier447294f2015-12-11 00:04:41 +010018
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +090019FROM buildpack-deps:jessie-scm
Roger Meier447294f2015-12-11 00:04:41 +010020MAINTAINER Apache Thrift <dev@thrift.apache.org>
21
22ENV DEBIAN_FRONTEND noninteractive
23
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +090024# Add apt sources
James E. King, III43e959b2017-04-04 13:04:29 -040025# jessie-backports for cmake and some ruby bits
26RUN echo "deb http://ftp.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/jessie-backports.list
27
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +090028# Dart
29RUN curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
30 curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list && \
31 sed -i /etc/apt/sources.list.d/dart_stable.list -e 's/https:/http:/g'
32
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +090033RUN apt-get update && apt-get install -y --no-install-recommends \
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +090034`# General dependencies` \
Roger Meier447294f2015-12-11 00:04:41 +010035 bison \
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +090036 build-essential \
Roger Meier447294f2015-12-11 00:04:41 +010037 clang \
Roger Meier447294f2015-12-11 00:04:41 +010038 debhelper \
39 flex \
James E. King, III43e959b2017-04-04 13:04:29 -040040 pkg-config && \
41 apt-get -t jessie-backports install -y --no-install-recommends cmake
Roger Meier447294f2015-12-11 00:04:41 +010042
James E. King, III43e959b2017-04-04 13:04:29 -040043RUN apt-get install -y --no-install-recommends \
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +090044`# C++ dependencies` \
Roger Meier447294f2015-12-11 00:04:41 +010045 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
Roger Meier447294f2015-12-11 00:04:41 +010056
James E. King, III43e959b2017-04-04 13:04:29 -040057RUN apt-get install -y --no-install-recommends \
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +090058`# Java dependencies` \
Roger Meier447294f2015-12-11 00:04:41 +010059 ant \
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +090060 ant-optional \
Roger Meier447294f2015-12-11 00:04:41 +010061 openjdk-7-jdk \
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +090062 maven
Roger Meier447294f2015-12-11 00:04:41 +010063
James E. King, III43e959b2017-04-04 13:04:29 -040064RUN apt-get install -y --no-install-recommends \
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +090065`# Python dependencies` \
Roger Meier447294f2015-12-11 00:04:41 +010066 python-all \
Roger Meier447294f2015-12-11 00:04:41 +010067 python-all-dbg \
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +090068 python-all-dev \
69 python-pip \
Roger Meier447294f2015-12-11 00:04:41 +010070 python-setuptools \
Roger Meier447294f2015-12-11 00:04:41 +010071 python-twisted \
72 python-zope.interface \
Nobuaki Sukegawaf43d0ca2016-03-25 09:22:16 +090073 python3-all \
74 python3-all-dbg \
75 python3-all-dev \
76 python3-setuptools \
Nobuaki Sukegawa25536ad2016-02-04 15:08:55 +090077 python3-pip
Roger Meier447294f2015-12-11 00:04:41 +010078
James E. King, III43e959b2017-04-04 13:04:29 -040079RUN apt-get install -y --no-install-recommends \
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +090080`# Ruby dependencies` \
Roger Meier447294f2015-12-11 00:04:41 +010081 ruby \
jfarrellb2a4d4a2016-04-04 14:25:03 -040082 ruby-bundler \
Roger Meier447294f2015-12-11 00:04:41 +010083 ruby-dev \
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +090084`# Perl dependencies` \
Roger Meier447294f2015-12-11 00:04:41 +010085 libbit-vector-perl \
86 libclass-accessor-class-perl \
87 libcrypt-ssleay-perl \
88 libio-socket-ssl-perl \
89 libnet-ssleay-perl
90
James E. King, III43e959b2017-04-04 13:04:29 -040091RUN apt-get -t jessie-backports install -y ruby-bundler
92RUN apt-get install -y --no-install-recommends \
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +090093`# Php dependencies` \
Roger Meier447294f2015-12-11 00:04:41 +010094 php5 \
95 php5-dev \
96 php5-cli \
97 php-pear \
98 re2c \
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +090099 phpunit \
100`# GlibC dependencies` \
101 libglib2.0-dev
Roger Meier447294f2015-12-11 00:04:41 +0100102
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +0900103RUN apt-get update && apt-get install -y --no-install-recommends \
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +0900104`# Erlang dependencies` \
Roger Meier447294f2015-12-11 00:04:41 +0100105 erlang-base \
106 erlang-eunit \
107 erlang-dev \
108 erlang-tools \
109 rebar
110
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +0900111RUN apt-get update && apt-get install -y --no-install-recommends \
112`# Haskell dependencies` \
113 ghc \
114 cabal-install \
115`# Haxe dependencies` \
116 neko \
117 neko-dev \
118 libneko0
119
120RUN apt-get update && apt-get install -y --no-install-recommends \
121`# Node.js dependencies` \
122 nodejs \
123 nodejs-dev \
124 nodejs-legacy \
125 npm
126
127RUN apt-get update && apt-get install -y --no-install-recommends \
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +0900128`# D dependencies` \
129 xdg-utils \
130`# Dart dependencies` \
131 dart \
132`# Lua dependencies` \
133 lua5.2 \
134 lua5.2-dev \
135`# MinGW dependencies` \
136 mingw32 \
137 mingw32-binutils \
138`# mingw32-runtime` \
139 nsis \
140`# Clean up` \
141 && rm -rf /var/cache/apt/* && \
142 rm -rf /var/lib/apt/lists/* && \
143 rm -rf /tmp/* && \
144 rm -rf /var/tmp/*
145
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +0900146# Ruby
Nobuaki Sukegawa080041c2016-09-04 18:49:19 +0900147RUN gem install bundler --no-ri --no-rdoc
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +0900148
Nobuaki Sukegawabf9fa902016-09-04 18:49:21 +0900149# Python optional dependencies
150RUN pip2 install -U ipaddress backports.ssl_match_hostname tornado
151RUN pip3 install -U backports.ssl_match_hostname tornado
152
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +0900153# Go
taozlec0d384a2017-07-17 18:40:42 +0200154RUN curl -sSL https://storage.googleapis.com/golang/go1.4.3.linux-amd64.tar.gz | tar -C /usr/local/ -xz
Roger Meier447294f2015-12-11 00:04:41 +0100155ENV PATH /usr/local/go/bin:$PATH
156
Roger Meier447294f2015-12-11 00:04:41 +0100157# Haxe
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +0900158RUN mkdir -p /usr/lib/haxe && \
James E. King, III9a8d5762017-03-27 15:39:00 -0400159 wget -O - https://github.com/HaxeFoundation/haxe/releases/download/3.2.1/haxe-3.2.1-linux64.tar.gz | \
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +0900160 tar -C /usr/lib/haxe --strip-components=1 -xz && \
Roger Meier447294f2015-12-11 00:04:41 +0100161 ln -s /usr/lib/haxe/haxe /usr/bin/haxe && \
162 ln -s /usr/lib/haxe/haxelib /usr/bin/haxelib && \
163 mkdir -p /usr/lib/haxe/lib && \
164 chmod -R 777 /usr/lib/haxe/lib && \
165 haxelib setup /usr/lib/haxe/lib && \
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +0900166 haxelib install hxcpp
Roger Meier447294f2015-12-11 00:04:41 +0100167
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +0900168# D
169RUN 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 +0900170 dpkg -i /tmp/dmd_2.070.0-0_amd64.deb && \
Nobuaki Sukegawaeee04d92016-02-22 22:13:31 +0900171 rm /tmp/dmd_2.070.0-0_amd64.deb && \
172 curl -sSL https://github.com/D-Programming-Deimos/openssl/archive/master.tar.gz| tar xz && \
173 curl -sSL https://github.com/D-Programming-Deimos/libevent/archive/master.tar.gz| tar xz && \
174 mkdir -p /usr/include/dmd/druntime/import/deimos /usr/include/dmd/druntime/import/C && \
175 mv libevent-master/deimos/* openssl-master/deimos/* /usr/include/dmd/druntime/import/deimos/ && \
176 mv libevent-master/C/* openssl-master/C/* /usr/include/dmd/druntime/import/C/ && \
177 rm -rf libevent-master openssl-master && \
178 echo 'gcc -Wl,--no-as-needed $*' > /usr/local/bin/gcc-dmd && \
179 chmod 755 /usr/local/bin/gcc-dmd && \
180 echo 'CC=/usr/local/bin/gcc-dmd' >> /etc/dmd.conf
Roger Meier447294f2015-12-11 00:04:41 +0100181
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +0900182# Dart
Roger Meier447294f2015-12-11 00:04:41 +0100183ENV PATH /usr/lib/dart/bin:$PATH
184
James E. King, IIIec50ae02017-02-14 16:12:11 -0500185# OCaml
186RUN echo 'deb http://ppa.launchpad.net/avsm/ppa/ubuntu trusty main' > /etc/apt/sources.list.d/avsm-official-ocaml.list && \
187 gpg --keyserver keyserver.ubuntu.com --recv 61707B09 && \
188 gpg --export --armor 61707B09 | apt-key add - && \
189 apt-get update && \
190 apt-get install -y ocaml opam && \
191 opam init && \
192 opam install oasis
193
Nobuaki Sukegawadd2223c2016-02-22 21:02:37 +0900194# Force utf8 locale to successfully build Haskell tf-random
195ENV LC_ALL C.UTF-8
196
Roger Meier447294f2015-12-11 00:04:41 +0100197ENV THRIFT_ROOT /thrift
198RUN mkdir -p $THRIFT_ROOT/src
Nobuaki Sukegawa93fb7ea2016-09-04 17:00:11 +0900199COPY Dockerfile $THRIFT_ROOT/
Roger Meier447294f2015-12-11 00:04:41 +0100200WORKDIR $THRIFT_ROOT/src