blob: 15e02e9c1817a3f0343fc01b95de4c520113133f [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 \
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +0900112`# Haxe dependencies` \
113 neko \
114 neko-dev \
115 libneko0
116
117RUN apt-get update && apt-get install -y --no-install-recommends \
118`# Node.js dependencies` \
119 nodejs \
120 nodejs-dev \
121 nodejs-legacy \
122 npm
123
124RUN apt-get update && apt-get install -y --no-install-recommends \
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +0900125`# D dependencies` \
126 xdg-utils \
127`# Dart dependencies` \
128 dart \
129`# Lua dependencies` \
130 lua5.2 \
131 lua5.2-dev \
132`# MinGW dependencies` \
133 mingw32 \
134 mingw32-binutils \
135`# mingw32-runtime` \
136 nsis \
137`# Clean up` \
138 && rm -rf /var/cache/apt/* && \
139 rm -rf /var/lib/apt/lists/* && \
140 rm -rf /tmp/* && \
141 rm -rf /var/tmp/*
142
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +0900143# Ruby
Nobuaki Sukegawa080041c2016-09-04 18:49:19 +0900144RUN gem install bundler --no-ri --no-rdoc
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +0900145
Nobuaki Sukegawabf9fa902016-09-04 18:49:21 +0900146# Python optional dependencies
147RUN pip2 install -U ipaddress backports.ssl_match_hostname tornado
148RUN pip3 install -U backports.ssl_match_hostname tornado
149
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +0900150# Go
taozlec0d384a2017-07-17 18:40:42 +0200151RUN 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 +0100152ENV PATH /usr/local/go/bin:$PATH
153
Roger Meier447294f2015-12-11 00:04:41 +0100154# Haxe
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +0900155RUN mkdir -p /usr/lib/haxe && \
James E. King, III9a8d5762017-03-27 15:39:00 -0400156 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 +0900157 tar -C /usr/lib/haxe --strip-components=1 -xz && \
Roger Meier447294f2015-12-11 00:04:41 +0100158 ln -s /usr/lib/haxe/haxe /usr/bin/haxe && \
159 ln -s /usr/lib/haxe/haxelib /usr/bin/haxelib && \
160 mkdir -p /usr/lib/haxe/lib && \
161 chmod -R 777 /usr/lib/haxe/lib && \
162 haxelib setup /usr/lib/haxe/lib && \
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +0900163 haxelib install hxcpp
Roger Meier447294f2015-12-11 00:04:41 +0100164
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +0900165# D
166RUN 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 +0900167 dpkg -i /tmp/dmd_2.070.0-0_amd64.deb && \
Nobuaki Sukegawaeee04d92016-02-22 22:13:31 +0900168 rm /tmp/dmd_2.070.0-0_amd64.deb && \
169 curl -sSL https://github.com/D-Programming-Deimos/openssl/archive/master.tar.gz| tar xz && \
170 curl -sSL https://github.com/D-Programming-Deimos/libevent/archive/master.tar.gz| tar xz && \
171 mkdir -p /usr/include/dmd/druntime/import/deimos /usr/include/dmd/druntime/import/C && \
172 mv libevent-master/deimos/* openssl-master/deimos/* /usr/include/dmd/druntime/import/deimos/ && \
173 mv libevent-master/C/* openssl-master/C/* /usr/include/dmd/druntime/import/C/ && \
174 rm -rf libevent-master openssl-master && \
175 echo 'gcc -Wl,--no-as-needed $*' > /usr/local/bin/gcc-dmd && \
176 chmod 755 /usr/local/bin/gcc-dmd && \
177 echo 'CC=/usr/local/bin/gcc-dmd' >> /etc/dmd.conf
Roger Meier447294f2015-12-11 00:04:41 +0100178
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +0900179# Dart
Roger Meier447294f2015-12-11 00:04:41 +0100180ENV PATH /usr/lib/dart/bin:$PATH
181
James E. King, IIIec50ae02017-02-14 16:12:11 -0500182# OCaml
183RUN echo 'deb http://ppa.launchpad.net/avsm/ppa/ubuntu trusty main' > /etc/apt/sources.list.d/avsm-official-ocaml.list && \
184 gpg --keyserver keyserver.ubuntu.com --recv 61707B09 && \
185 gpg --export --armor 61707B09 | apt-key add - && \
186 apt-get update && \
187 apt-get install -y ocaml opam && \
188 opam init && \
189 opam install oasis
190
Nobuaki Sukegawadd2223c2016-02-22 21:02:37 +0900191# Force utf8 locale to successfully build Haskell tf-random
192ENV LC_ALL C.UTF-8
193
Roger Meier447294f2015-12-11 00:04:41 +0100194ENV THRIFT_ROOT /thrift
195RUN mkdir -p $THRIFT_ROOT/src
Nobuaki Sukegawa93fb7ea2016-09-04 17:00:11 +0900196COPY Dockerfile $THRIFT_ROOT/
Roger Meier447294f2015-12-11 00:04:41 +0100197WORKDIR $THRIFT_ROOT/src