blob: b9c30f67a0c1b2073742e104081f47085c625c95 [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
James E. King IIId907cc92018-01-12 10:43:25 -050017# - d: dmd does not come with Ubuntu
18# - dart: does not come with Ubuntu
19# - dotnet: does not come with Ubuntu
20# - haxe: version 3.4.2 that comes with Ubuntu cores in our CI build
21# - nodejs: want v8, Ubuntu comes with v6
James E. King, III0ad20bd2017-09-30 15:44:16 -070022
23FROM buildpack-deps:artful-scm
24MAINTAINER Apache Thrift <dev@thrift.apache.org>
25ENV DEBIAN_FRONTEND noninteractive
26
Robert Lu31d5b7b2018-01-05 13:44:38 +080027### Add apt repos
28
Robert Lua15060a2017-12-28 15:29:39 +080029RUN apt-get update && \
30 apt-get dist-upgrade -y && \
James E. King, III0ad20bd2017-09-30 15:44:16 -070031 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
Robert Lu31d5b7b2018-01-05 13:44:38 +080044# D
45RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EBCF975E5BA24D5E && \
46 wget http://master.dl.sourceforge.net/project/d-apt/files/d-apt.list -O /etc/apt/sources.list.d/d-apt.list && \
47 wget -qO - https://dlang.org/d-keyring.gpg | apt-key add -
48
49# Dart
50RUN curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
51 curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > \
52 /etc/apt/sources.list.d/dart_stable.list
James E. King, III0ad20bd2017-09-30 15:44:16 -070053
James E. King IIId907cc92018-01-12 10:43:25 -050054# dotnet (netcore)
55RUN curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > /etc/apt/trusted.gpg.d/microsoft.gpg && \
56 echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-artful-prod artful main" > \
57 /etc/apt/sources.list.d/dotnetdev.list
58
59# haxe (https://haxe.org/download/linux/)
60RUN add-apt-repository ppa:haxe/releases -y
61
62# node.js
63RUN curl -sL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - \
64 echo "deb https://deb.nodesource.com/node_8.x artful main" | tee /etc/apt/sources.list.d/nodesource.list
65
James E. King, III0ad20bd2017-09-30 15:44:16 -070066### install general dependencies
Robert Lu31d5b7b2018-01-05 13:44:38 +080067RUN apt-get update && apt-get install -y --no-install-recommends \
James E. King, III0ad20bd2017-09-30 15:44:16 -070068`# General dependencies` \
69 bash-completion \
70 bison \
71 build-essential \
72 clang \
73 cmake \
74 debhelper \
75 flex \
76 gdb \
77 llvm \
78 ninja-build \
79 pkg-config \
80 valgrind \
81 vim
82ENV PATH /usr/lib/llvm-3.8/bin:$PATH
83
84# boost-1.62 has a terrible bug in boost::test, see https://svn.boost.org/trac10/ticket/12507
85RUN apt-get install -y --no-install-recommends \
86`# C++ dependencies` \
87 libboost1.63-all-dev \
88 libevent-dev \
89 libssl-dev \
90 qt5-default \
91 qtbase5-dev \
92 qtbase5-dev-tools
93
94RUN apt-get install -y --no-install-recommends \
95`# csharp (mono) dependencies` \
96 mono-devel
97
James E. King IIIf338d572018-01-29 14:51:24 -050098ENV D_VERSION 2.077.1-0.1
Robert Lu31d5b7b2018-01-05 13:44:38 +080099RUN apt-get install -y --no-install-recommends \
Tomek Kurcze93a9012017-09-19 09:16:43 +0200100`# Common Lisp (sbcl) dependencies` \
101 sbcl
102
103RUN apt-get install -y --no-install-recommends \
James E. King, III0ad20bd2017-09-30 15:44:16 -0700104 `# D dependencies` \
James E. King IIIf338d572018-01-29 14:51:24 -0500105 dmd-bin=$D_VERSION \
106 libphobos2-dev=$D_VERSION \
107 dmd-compiler=$D_VERSION \
108 dmd-tools=$D_VERSION \
James E. King, III0ad20bd2017-09-30 15:44:16 -0700109 dub \
110 dfmt \
111 dscanner \
112 libevent-dev \
113 libssl-dev \
114 xdg-utils
James E. King IIIf338d572018-01-29 14:51:24 -0500115RUN mkdir -p /usr/include/dmd/druntime/import/deimos /usr/include/dmd/druntime/import/C && \
116 curl -sSL https://github.com/D-Programming-Deimos/libevent/archive/master.tar.gz| tar xz && \
117 mv libevent-master/deimos/* /usr/include/dmd/druntime/import/deimos/ && \
118 mv libevent-master/C/* /usr/include/dmd/druntime/import/C/ && \
119 rm -rf libevent-master
120RUN curl -sSL https://github.com/D-Programming-Deimos/openssl/archive/master.tar.gz| tar xz && \
121 mv openssl-master/deimos/* /usr/include/dmd/druntime/import/deimos/ && \
122 mv openssl-master/C/* /usr/include/dmd/druntime/import/C/ && \
123 rm -rf openssl-master
James E. King, III0ad20bd2017-09-30 15:44:16 -0700124
Robert Lu31d5b7b2018-01-05 13:44:38 +0800125RUN apt-get install -y --no-install-recommends \
Robert Luc72d8dc2017-12-29 04:14:38 +0800126 `# Dart dependencies` \
127 dart/stable
James E. King, III6e883f92017-11-18 21:18:05 -0500128ENV PATH /usr/lib/dart/bin:$PATH
James E. King, III0ad20bd2017-09-30 15:44:16 -0700129
James E. King, III6e883f92017-11-18 21:18:05 -0500130RUN apt-get install -y --no-install-recommends \
131`# dotnet core dependencies` \
James E. King IIIf338d572018-01-29 14:51:24 -0500132 dotnet-sdk-2.1.4
James E. King, III0ad20bd2017-09-30 15:44:16 -0700133
134RUN apt-get install -y --no-install-recommends \
135`# Erlang dependencies` \
136 erlang-base \
137 erlang-eunit \
138 erlang-dev \
139 erlang-tools \
140 rebar
141
142RUN apt-get install -y --no-install-recommends \
143`# GlibC dependencies` \
144 libglib2.0-dev
145
146RUN apt-get install -y --no-install-recommends \
147`# golang (go) dependencies` \
148 golang-go \
149 golang-race-detector-runtime
150
151RUN apt-get install -y --no-install-recommends \
152`# Haskell dependencies` \
153 ghc \
154 cabal-install
155
James E. King IIId907cc92018-01-12 10:43:25 -0500156RUN apt-get install -y --no-install-recommends \
157`# Haxe dependencies` \
158 haxe \
159 neko \
160 neko-dev && \
161 haxelib setup --always /usr/share/haxe/lib && \
162 haxelib install --always hxcpp 2>&1 > /dev/null
James E. King, III0ad20bd2017-09-30 15:44:16 -0700163
164RUN apt-get install -y --no-install-recommends \
165`# Java dependencies` \
166 ant \
167 ant-optional \
168 openjdk-8-jdk \
169 maven
170
171RUN apt-get install -y --no-install-recommends \
172`# Lua dependencies` \
James E. King, III39eaae62017-11-19 20:17:33 -0500173 lua5.2 \
174 lua5.2-dev
James E. King, III0ad20bd2017-09-30 15:44:16 -0700175# https://bugs.launchpad.net/ubuntu/+source/lua5.3/+bug/1707212
176# lua5.3 does not install alternatives!
James E. King, III39eaae62017-11-19 20:17:33 -0500177# need to update our luasocket code, lua doesn't have luaL_openlib any more
James E. King, III0ad20bd2017-09-30 15:44:16 -0700178
179RUN apt-get install -y --no-install-recommends \
180`# Node.js dependencies` \
James E. King, III619218c2017-10-29 06:55:00 -0400181 nodejs
James E. King, III0ad20bd2017-09-30 15:44:16 -0700182
183RUN apt-get install -y --no-install-recommends \
184`# OCaml dependencies` \
185 ocaml \
186 opam && \
187 opam init --yes && \
188 opam install --yes oasis
189
190RUN apt-get install -y --no-install-recommends \
191`# Perl dependencies` \
192 libbit-vector-perl \
193 libclass-accessor-class-perl \
194 libcrypt-ssleay-perl \
195 libio-socket-ssl-perl \
196 libnet-ssleay-perl
197
198RUN apt-get install -y --no-install-recommends \
199`# Php dependencies` \
200 php \
201 php-cli \
202 php-dev \
203 php-pear \
204 re2c \
Robert Lua15060a2017-12-28 15:29:39 +0800205 composer
James E. King, III0ad20bd2017-09-30 15:44:16 -0700206
207RUN apt-get install -y --no-install-recommends \
208`# Python dependencies` \
209 python-all \
210 python-all-dbg \
211 python-all-dev \
212 python-ipaddress \
213 python-pip \
214 python-setuptools \
215 python-six \
216 python-tornado \
217 python-twisted \
218 python-wheel \
219 python-zope.interface && \
220 pip install --upgrade backports.ssl_match_hostname
221
222RUN apt-get install -y --no-install-recommends \
223`# Python3 dependencies` \
224 python3-all \
225 python3-all-dbg \
226 python3-all-dev \
227 python3-pip \
228 python3-setuptools \
229 python3-six \
230 python3-tornado \
231 python3-twisted \
232 python3-wheel \
233 python3-zope.interface
234
235RUN apt-get install -y --no-install-recommends \
236`# Ruby dependencies` \
237 ruby \
238 ruby-dev \
239 ruby-bundler
240RUN gem install bundler --no-ri --no-rdoc
241
242RUN apt-get install -y --no-install-recommends \
243`# Rust dependencies` \
244 cargo \
245 rustc
246
247RUN apt-get install -y --no-install-recommends \
248`# Static Code Analysis dependencies` \
249 cppcheck \
250 sloccount && \
251 pip install flake8
252
253# Clean up
254RUN rm -rf /var/cache/apt/* && \
255 rm -rf /var/lib/apt/lists/* && \
256 rm -rf /tmp/* && \
257 rm -rf /var/tmp/*
258
259ENV THRIFT_ROOT /thrift
260RUN mkdir -p $THRIFT_ROOT/src
261COPY Dockerfile $THRIFT_ROOT/
262WORKDIR $THRIFT_ROOT/src