blob: 1c8f9633e17cccb20e330a4391067468964acdf2 [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
19# - dart: dart repository doesn't work with apt 1.4 in artful
20# - dotnetcore, because netcore is for 1.0.0-preview and 2.0.0 is out
21# - haxe: see THRIFT-4352, but test/haxe cores during testing
22# and hxcpp 3.4.64 is not compatible with artful
23#
24
25FROM buildpack-deps:artful-scm
26MAINTAINER Apache Thrift <dev@thrift.apache.org>
27ENV DEBIAN_FRONTEND noninteractive
28
29RUN apt-get update && \
30 apt-get dist-upgrade -y && \
31 apt-get install -y --no-install-recommends \
32 apt \
33 apt-transport-https \
34 apt-utils \
35 curl \
36 dirmngr \
37 software-properties-common \
38 wget
39
40# csharp (mono) - if we ever want a later version
41# RUN echo "deb http://download.mono-project.com/repo/debian xenial main" | tee /etc/apt/sources.list.d/mono.list && \
42# apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A6A19B38D3D831EF
43
44# dotnet (core) 2.0.0 - project isn't ready for this yet:
45# RUN curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > /etc/apt/trusted.gpg.d/microsoft.gpg && \
46# echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-xenial-prod xenial main" > /etc/apt/sources.list.d/dotnetdev.list
47
48# node.js (this step runs apt-get update internally) - if we ever want a later version
49# note: node 8.5 introduced some issues with directory handling / jsdoc / something... using 7.x for now
50# RUN curl -sL https://deb.nodesource.com/setup_7.x | bash
51
52### install general dependencies
53RUN apt-get install -y --no-install-recommends \
54`# General dependencies` \
55 bash-completion \
56 bison \
57 build-essential \
58 clang \
59 cmake \
60 debhelper \
61 flex \
62 gdb \
63 llvm \
64 ninja-build \
65 pkg-config \
66 valgrind \
67 vim
68ENV PATH /usr/lib/llvm-3.8/bin:$PATH
69
70# boost-1.62 has a terrible bug in boost::test, see https://svn.boost.org/trac10/ticket/12507
71RUN apt-get install -y --no-install-recommends \
72`# C++ dependencies` \
73 libboost1.63-all-dev \
74 libevent-dev \
75 libssl-dev \
76 qt5-default \
77 qtbase5-dev \
78 qtbase5-dev-tools
79
80RUN apt-get install -y --no-install-recommends \
81`# csharp (mono) dependencies` \
82 mono-devel
83
84RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EBCF975E5BA24D5E && \
85 wget http://master.dl.sourceforge.net/project/d-apt/files/d-apt.list -O /etc/apt/sources.list.d/d-apt.list && \
86 wget -qO - https://dlang.org/d-keyring.gpg | apt-key add - && \
87 apt-get update && \
88 apt-get install -y --no-install-recommends \
89 `# D dependencies` \
90 dmd-bin \
91 libphobos2-dev \
92 dub \
93 dfmt \
94 dscanner \
95 libevent-dev \
96 libssl-dev \
97 xdg-utils
98# libevent deimos doesn't seem to work so not enabling it:
99# RUN mkdir -p /usr/include/dmd/druntime/import/deimos /usr/include/dmd/druntime/import/C && \
100# curl -sSL https://github.com/D-Programming-Deimos/libevent/archive/master.tar.gz| tar xz && \
101# mv libevent-master/deimos/* /usr/include/dmd/druntime/import/deimos/ && \
102# mv libevent-master/C/* /usr/include/dmd/druntime/import/C/ && \
103# rm -rf libevent-master
104# openssl deimos doesn't work with openssl-1.0.2 so not enabling it:
105# RUN curl -sSL https://github.com/D-Programming-Deimos/openssl/archive/master.tar.gz| tar xz && \
106# mv openssl-master/deimos/* /usr/include/dmd/druntime/import/deimos/ && \
107# mv openssl-master/C/* /usr/include/dmd/druntime/import/C/ && \
108# rm -rf openssl-master
109
110# dart is disabled because the repository won't sync properly with apt 1.4
111# RUN curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
112# curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list && \
113# apt-get update && \
114# apt-get install -y --no-install-recommends \
115# `# Dart dependencies` \
116# dart
117# ENV PATH /usr/lib/dart/bin:$PATH
118
119# project isn't ready for this quite yet:
120# RUN apt-get install -y --no-install-recommends \
121# `# dotnet core dependencies` \
122# dotnet-sdk-2.0.0
123
124RUN apt-get install -y --no-install-recommends \
125`# Erlang dependencies` \
126 erlang-base \
127 erlang-eunit \
128 erlang-dev \
129 erlang-tools \
130 rebar
131
132RUN apt-get install -y --no-install-recommends \
133`# GlibC dependencies` \
134 libglib2.0-dev
135
136RUN apt-get install -y --no-install-recommends \
137`# golang (go) dependencies` \
138 golang-go \
139 golang-race-detector-runtime
140
141RUN apt-get install -y --no-install-recommends \
142`# Haskell dependencies` \
143 ghc \
144 cabal-install
145
146# see THRIFT-4352, test/haxe cores on artful
147# RUN apt-get install -y --no-install-recommends \
148# `# Haxe dependencies` \
149# haxe \
150# neko \
151# neko-dev
152# RUN haxelib setup --always /usr/share/haxe/lib && \
153# haxelib install --always hxcpp
154
155RUN apt-get install -y --no-install-recommends \
156`# Java dependencies` \
157 ant \
158 ant-optional \
159 openjdk-8-jdk \
160 maven
161
162RUN apt-get install -y --no-install-recommends \
163`# Lua dependencies` \
164 lua5.3 \
165 lua5.3-dev && \
166 ln -s /usr/bin/lua5.3 /usr/bin/lua && \
167 ln -s /usr/bin/luac5.3 /usr/bin/luac
168# https://bugs.launchpad.net/ubuntu/+source/lua5.3/+bug/1707212
169# lua5.3 does not install alternatives!
170
171RUN apt-get install -y --no-install-recommends \
172`# Node.js dependencies` \
173 nodejs \
174 npm
175
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