blob: cba29020fc813b539b5d677156a727e81d00b57b [file] [log] [blame]
James E. King, III0ad20bd2017-09-30 15:44:16 -07001# 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#
14# Apache Thrift Docker build environment for Ubuntu Artful
15# Using all stock Ubuntu Artful packaging except for:
16# - cpp: stock boost 1.62 in artful has a nasty bug so we use stock boost 1.63
17# - d: does not come with Ubuntu so we're installing the latest
18# - d: deimos for libevent and openssl omitted - not compatible / build errors
James E. King, III0ad20bd2017-09-30 15:44:16 -070019# - haxe: see THRIFT-4352, but test/haxe cores during testing
20# and hxcpp 3.4.64 is not compatible with artful
21#
22
23FROM buildpack-deps:artful-scm
24MAINTAINER Apache Thrift <dev@thrift.apache.org>
25ENV DEBIAN_FRONTEND noninteractive
26
27RUN apt-get update && \
28 apt-get dist-upgrade -y && \
29 apt-get install -y --no-install-recommends \
30 apt \
31 apt-transport-https \
32 apt-utils \
33 curl \
34 dirmngr \
35 software-properties-common \
36 wget
37
38# csharp (mono) - if we ever want a later version
39# RUN echo "deb http://download.mono-project.com/repo/debian xenial main" | tee /etc/apt/sources.list.d/mono.list && \
40# apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A6A19B38D3D831EF
41
James E. King, III6e883f92017-11-18 21:18:05 -050042# dotnet (core)
43RUN curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > /etc/apt/trusted.gpg.d/microsoft.gpg && \
44 echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-artful-prod artful main" > /etc/apt/sources.list.d/dotnetdev.list
James E. King, III0ad20bd2017-09-30 15:44:16 -070045
46# node.js (this step runs apt-get update internally) - if we ever want a later version
James E. King, III619218c2017-10-29 06:55:00 -040047RUN curl -sL https://deb.nodesource.com/setup_8.x | bash -
James E. King, III0ad20bd2017-09-30 15:44:16 -070048
49### install general dependencies
50RUN apt-get install -y --no-install-recommends \
51`# General dependencies` \
52 bash-completion \
53 bison \
54 build-essential \
55 clang \
56 cmake \
57 debhelper \
58 flex \
59 gdb \
60 llvm \
61 ninja-build \
62 pkg-config \
63 valgrind \
64 vim
65ENV PATH /usr/lib/llvm-3.8/bin:$PATH
66
67# boost-1.62 has a terrible bug in boost::test, see https://svn.boost.org/trac10/ticket/12507
68RUN apt-get install -y --no-install-recommends \
69`# C++ dependencies` \
70 libboost1.63-all-dev \
71 libevent-dev \
72 libssl-dev \
73 qt5-default \
74 qtbase5-dev \
75 qtbase5-dev-tools
76
77RUN apt-get install -y --no-install-recommends \
78`# csharp (mono) dependencies` \
79 mono-devel
80
81RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EBCF975E5BA24D5E && \
82 wget http://master.dl.sourceforge.net/project/d-apt/files/d-apt.list -O /etc/apt/sources.list.d/d-apt.list && \
83 wget -qO - https://dlang.org/d-keyring.gpg | apt-key add - && \
84 apt-get update && \
85 apt-get install -y --no-install-recommends \
86 `# D dependencies` \
87 dmd-bin \
88 libphobos2-dev \
89 dub \
90 dfmt \
91 dscanner \
92 libevent-dev \
93 libssl-dev \
94 xdg-utils
95# libevent deimos doesn't seem to work so not enabling it:
96# RUN mkdir -p /usr/include/dmd/druntime/import/deimos /usr/include/dmd/druntime/import/C && \
97# curl -sSL https://github.com/D-Programming-Deimos/libevent/archive/master.tar.gz| tar xz && \
98# mv libevent-master/deimos/* /usr/include/dmd/druntime/import/deimos/ && \
99# mv libevent-master/C/* /usr/include/dmd/druntime/import/C/ && \
100# rm -rf libevent-master
101# openssl deimos doesn't work with openssl-1.0.2 so not enabling it:
102# RUN curl -sSL https://github.com/D-Programming-Deimos/openssl/archive/master.tar.gz| tar xz && \
103# mv openssl-master/deimos/* /usr/include/dmd/druntime/import/deimos/ && \
104# mv openssl-master/C/* /usr/include/dmd/druntime/import/C/ && \
105# rm -rf openssl-master
106
James E. King, III6e883f92017-11-18 21:18:05 -0500107# dart cannot be downloaded by aptitude because of
108# https://github.com/dart-lang/sdk/issues/30512
James E. King, III0ad20bd2017-09-30 15:44:16 -0700109# RUN curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
110# curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list && \
111# apt-get update && \
112# apt-get install -y --no-install-recommends \
113# `# Dart dependencies` \
114# dart
James E. King, III6e883f92017-11-18 21:18:05 -0500115# so instead we do:
116RUN wget https://storage.googleapis.com/dart-archive/channels/stable/release/latest/linux_packages/dart_1.24.2-1_amd64.deb && \
117 dpkg -i dart_1.24.2-1_amd64.deb && \
118 rm dart_1.24.2-1_amd64.deb
119ENV PATH /usr/lib/dart/bin:$PATH
James E. King, III0ad20bd2017-09-30 15:44:16 -0700120
James E. King, III6e883f92017-11-18 21:18:05 -0500121RUN apt-get install -y --no-install-recommends \
122`# dotnet core dependencies` \
123 dotnet-sdk-2.0.3
James E. King, III0ad20bd2017-09-30 15:44:16 -0700124
125RUN apt-get install -y --no-install-recommends \
126`# Erlang dependencies` \
127 erlang-base \
128 erlang-eunit \
129 erlang-dev \
130 erlang-tools \
131 rebar
132
133RUN apt-get install -y --no-install-recommends \
134`# GlibC dependencies` \
135 libglib2.0-dev
136
137RUN apt-get install -y --no-install-recommends \
138`# golang (go) dependencies` \
139 golang-go \
140 golang-race-detector-runtime
141
142RUN apt-get install -y --no-install-recommends \
143`# Haskell dependencies` \
144 ghc \
145 cabal-install
146
147# see THRIFT-4352, test/haxe cores on artful
148# RUN apt-get install -y --no-install-recommends \
149# `# Haxe dependencies` \
150# haxe \
151# neko \
152# neko-dev
153# RUN haxelib setup --always /usr/share/haxe/lib && \
154# haxelib install --always hxcpp
155
156RUN apt-get install -y --no-install-recommends \
157`# Java dependencies` \
158 ant \
159 ant-optional \
160 openjdk-8-jdk \
161 maven
162
163RUN apt-get install -y --no-install-recommends \
164`# Lua dependencies` \
James E. King, III39eaae62017-11-19 20:17:33 -0500165 lua5.2 \
166 lua5.2-dev
James E. King, III0ad20bd2017-09-30 15:44:16 -0700167# https://bugs.launchpad.net/ubuntu/+source/lua5.3/+bug/1707212
168# lua5.3 does not install alternatives!
James E. King, III39eaae62017-11-19 20:17:33 -0500169# need to update our luasocket code, lua doesn't have luaL_openlib any more
James E. King, III0ad20bd2017-09-30 15:44:16 -0700170
171RUN apt-get install -y --no-install-recommends \
172`# Node.js dependencies` \
James E. King, III619218c2017-10-29 06:55:00 -0400173 nodejs
James E. King, III0ad20bd2017-09-30 15:44:16 -0700174
175RUN apt-get install -y --no-install-recommends \
176`# OCaml dependencies` \
177 ocaml \
178 opam && \
179 opam init --yes && \
180 opam install --yes oasis
181
182RUN apt-get install -y --no-install-recommends \
183`# Perl dependencies` \
184 libbit-vector-perl \
185 libclass-accessor-class-perl \
186 libcrypt-ssleay-perl \
187 libio-socket-ssl-perl \
188 libnet-ssleay-perl
189
190RUN apt-get install -y --no-install-recommends \
191`# Php dependencies` \
192 php \
193 php-cli \
194 php-dev \
195 php-pear \
196 re2c \
197 phpunit
198
199RUN apt-get install -y --no-install-recommends \
200`# Python dependencies` \
201 python-all \
202 python-all-dbg \
203 python-all-dev \
204 python-ipaddress \
205 python-pip \
206 python-setuptools \
207 python-six \
208 python-tornado \
209 python-twisted \
210 python-wheel \
211 python-zope.interface && \
212 pip install --upgrade backports.ssl_match_hostname
213
214RUN apt-get install -y --no-install-recommends \
215`# Python3 dependencies` \
216 python3-all \
217 python3-all-dbg \
218 python3-all-dev \
219 python3-pip \
220 python3-setuptools \
221 python3-six \
222 python3-tornado \
223 python3-twisted \
224 python3-wheel \
225 python3-zope.interface
226
227RUN apt-get install -y --no-install-recommends \
228`# Ruby dependencies` \
229 ruby \
230 ruby-dev \
231 ruby-bundler
232RUN gem install bundler --no-ri --no-rdoc
233
234RUN apt-get install -y --no-install-recommends \
235`# Rust dependencies` \
236 cargo \
237 rustc
238
239RUN apt-get install -y --no-install-recommends \
240`# Static Code Analysis dependencies` \
241 cppcheck \
242 sloccount && \
243 pip install flake8
244
245# Clean up
246RUN rm -rf /var/cache/apt/* && \
247 rm -rf /var/lib/apt/lists/* && \
248 rm -rf /tmp/* && \
249 rm -rf /var/tmp/*
250
251ENV THRIFT_ROOT /thrift
252RUN mkdir -p $THRIFT_ROOT/src
253COPY Dockerfile $THRIFT_ROOT/
254WORKDIR $THRIFT_ROOT/src