blob: 756209d8430db4cba9ab7662989abacda44231d6 [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` \
165 lua5.3 \
166 lua5.3-dev && \
167 ln -s /usr/bin/lua5.3 /usr/bin/lua && \
168 ln -s /usr/bin/luac5.3 /usr/bin/luac
169# https://bugs.launchpad.net/ubuntu/+source/lua5.3/+bug/1707212
170# lua5.3 does not install alternatives!
171
172RUN apt-get install -y --no-install-recommends \
173`# Node.js dependencies` \
James E. King, III619218c2017-10-29 06:55:00 -0400174 nodejs
James E. King, III0ad20bd2017-09-30 15:44:16 -0700175
176RUN apt-get install -y --no-install-recommends \
177`# OCaml dependencies` \
178 ocaml \
179 opam && \
180 opam init --yes && \
181 opam install --yes oasis
182
183RUN apt-get install -y --no-install-recommends \
184`# Perl dependencies` \
185 libbit-vector-perl \
186 libclass-accessor-class-perl \
187 libcrypt-ssleay-perl \
188 libio-socket-ssl-perl \
189 libnet-ssleay-perl
190
191RUN apt-get install -y --no-install-recommends \
192`# Php dependencies` \
193 php \
194 php-cli \
195 php-dev \
196 php-pear \
197 re2c \
198 phpunit
199
200RUN apt-get install -y --no-install-recommends \
201`# Python dependencies` \
202 python-all \
203 python-all-dbg \
204 python-all-dev \
205 python-ipaddress \
206 python-pip \
207 python-setuptools \
208 python-six \
209 python-tornado \
210 python-twisted \
211 python-wheel \
212 python-zope.interface && \
213 pip install --upgrade backports.ssl_match_hostname
214
215RUN apt-get install -y --no-install-recommends \
216`# Python3 dependencies` \
217 python3-all \
218 python3-all-dbg \
219 python3-all-dev \
220 python3-pip \
221 python3-setuptools \
222 python3-six \
223 python3-tornado \
224 python3-twisted \
225 python3-wheel \
226 python3-zope.interface
227
228RUN apt-get install -y --no-install-recommends \
229`# Ruby dependencies` \
230 ruby \
231 ruby-dev \
232 ruby-bundler
233RUN gem install bundler --no-ri --no-rdoc
234
235RUN apt-get install -y --no-install-recommends \
236`# Rust dependencies` \
237 cargo \
238 rustc
239
240RUN apt-get install -y --no-install-recommends \
241`# Static Code Analysis dependencies` \
242 cppcheck \
243 sloccount && \
244 pip install flake8
245
246# Clean up
247RUN rm -rf /var/cache/apt/* && \
248 rm -rf /var/lib/apt/lists/* && \
249 rm -rf /tmp/* && \
250 rm -rf /var/tmp/*
251
252ENV THRIFT_ROOT /thrift
253RUN mkdir -p $THRIFT_ROOT/src
254COPY Dockerfile $THRIFT_ROOT/
255WORKDIR $THRIFT_ROOT/src