blob: 8aa0902c30e07bd2511436f1ec56fbe7f8ed7bda [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 \
82 ruby-dev \
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +090083`# Perl dependencies` \
Roger Meier447294f2015-12-11 00:04:41 +010084 libbit-vector-perl \
85 libclass-accessor-class-perl \
86 libcrypt-ssleay-perl \
87 libio-socket-ssl-perl \
88 libnet-ssleay-perl
89
James E. King, III43e959b2017-04-04 13:04:29 -040090RUN apt-get -t jessie-backports install -y ruby-bundler
91RUN apt-get install -y --no-install-recommends \
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +090092`# Php dependencies` \
Roger Meier447294f2015-12-11 00:04:41 +010093 php5 \
94 php5-dev \
95 php5-cli \
96 php-pear \
97 re2c \
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +090098 phpunit \
99`# GlibC dependencies` \
100 libglib2.0-dev
Roger Meier447294f2015-12-11 00:04:41 +0100101
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +0900102RUN apt-get update && apt-get install -y --no-install-recommends \
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +0900103`# Erlang dependencies` \
Roger Meier447294f2015-12-11 00:04:41 +0100104 erlang-base \
105 erlang-eunit \
106 erlang-dev \
107 erlang-tools \
108 rebar
109
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +0900110RUN apt-get update && apt-get install -y --no-install-recommends \
111`# Haskell dependencies` \
112 ghc \
113 cabal-install \
114`# Haxe dependencies` \
115 neko \
116 neko-dev \
117 libneko0
118
119RUN apt-get update && apt-get install -y --no-install-recommends \
120`# Node.js dependencies` \
121 nodejs \
122 nodejs-dev \
123 nodejs-legacy \
124 npm
125
126RUN apt-get update && apt-get install -y --no-install-recommends \
127`# CSharp dependencies` \
128 libmono-system-web2.0-cil \
Nobuaki Sukegawa080041c2016-09-04 18:49:19 +0900129 mono-devel
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +0900130
131RUN apt-get update && apt-get install -y --no-install-recommends \
132`# D dependencies` \
133 xdg-utils \
134`# Dart dependencies` \
135 dart \
136`# Lua dependencies` \
137 lua5.2 \
138 lua5.2-dev \
139`# MinGW dependencies` \
140 mingw32 \
141 mingw32-binutils \
142`# mingw32-runtime` \
143 nsis \
144`# Clean up` \
145 && rm -rf /var/cache/apt/* && \
146 rm -rf /var/lib/apt/lists/* && \
147 rm -rf /tmp/* && \
148 rm -rf /var/tmp/*
149
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +0900150# Ruby
Nobuaki Sukegawa080041c2016-09-04 18:49:19 +0900151RUN gem install bundler --no-ri --no-rdoc
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +0900152
Nobuaki Sukegawabf9fa902016-09-04 18:49:21 +0900153# Python optional dependencies
154RUN pip2 install -U ipaddress backports.ssl_match_hostname tornado
155RUN pip3 install -U backports.ssl_match_hostname tornado
156
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +0900157# Go
taozle5b4c6bf2017-06-27 12:27:40 +0200158RUN curl -sSL https://storage.googleapis.com/golang/go1.8.3.linux-amd64.tar.gz | tar -C /usr/local/ -xz
Roger Meier447294f2015-12-11 00:04:41 +0100159ENV PATH /usr/local/go/bin:$PATH
160
Roger Meier447294f2015-12-11 00:04:41 +0100161# Haxe
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +0900162RUN mkdir -p /usr/lib/haxe && \
James E. King, III9a8d5762017-03-27 15:39:00 -0400163 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 +0900164 tar -C /usr/lib/haxe --strip-components=1 -xz && \
Roger Meier447294f2015-12-11 00:04:41 +0100165 ln -s /usr/lib/haxe/haxe /usr/bin/haxe && \
166 ln -s /usr/lib/haxe/haxelib /usr/bin/haxelib && \
167 mkdir -p /usr/lib/haxe/lib && \
168 chmod -R 777 /usr/lib/haxe/lib && \
169 haxelib setup /usr/lib/haxe/lib && \
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +0900170 haxelib install hxcpp
Roger Meier447294f2015-12-11 00:04:41 +0100171
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +0900172# D
173RUN 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 +0900174 dpkg -i /tmp/dmd_2.070.0-0_amd64.deb && \
Nobuaki Sukegawaeee04d92016-02-22 22:13:31 +0900175 rm /tmp/dmd_2.070.0-0_amd64.deb && \
176 curl -sSL https://github.com/D-Programming-Deimos/openssl/archive/master.tar.gz| tar xz && \
177 curl -sSL https://github.com/D-Programming-Deimos/libevent/archive/master.tar.gz| tar xz && \
178 mkdir -p /usr/include/dmd/druntime/import/deimos /usr/include/dmd/druntime/import/C && \
179 mv libevent-master/deimos/* openssl-master/deimos/* /usr/include/dmd/druntime/import/deimos/ && \
180 mv libevent-master/C/* openssl-master/C/* /usr/include/dmd/druntime/import/C/ && \
181 rm -rf libevent-master openssl-master && \
182 echo 'gcc -Wl,--no-as-needed $*' > /usr/local/bin/gcc-dmd && \
183 chmod 755 /usr/local/bin/gcc-dmd && \
184 echo 'CC=/usr/local/bin/gcc-dmd' >> /etc/dmd.conf
Roger Meier447294f2015-12-11 00:04:41 +0100185
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +0900186# Dart
Roger Meier447294f2015-12-11 00:04:41 +0100187ENV PATH /usr/lib/dart/bin:$PATH
188
James E. King, IIIec50ae02017-02-14 16:12:11 -0500189# OCaml
190RUN echo 'deb http://ppa.launchpad.net/avsm/ppa/ubuntu trusty main' > /etc/apt/sources.list.d/avsm-official-ocaml.list && \
191 gpg --keyserver keyserver.ubuntu.com --recv 61707B09 && \
192 gpg --export --armor 61707B09 | apt-key add - && \
193 apt-get update && \
194 apt-get install -y ocaml opam && \
195 opam init && \
196 opam install oasis
197
Nobuaki Sukegawadd2223c2016-02-22 21:02:37 +0900198# Force utf8 locale to successfully build Haskell tf-random
199ENV LC_ALL C.UTF-8
200
Roger Meier447294f2015-12-11 00:04:41 +0100201ENV THRIFT_ROOT /thrift
202RUN mkdir -p $THRIFT_ROOT/src
Nobuaki Sukegawa93fb7ea2016-09-04 17:00:11 +0900203COPY Dockerfile $THRIFT_ROOT/
Roger Meier447294f2015-12-11 00:04:41 +0100204WORKDIR $THRIFT_ROOT/src