blob: 394e84f60aab0fa4fcf54b24d79368164d8e1f8d [file] [log] [blame]
jfarrelle03f7e82015-02-18 23:25:54 -05001# 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
jfarrelle03f7e82015-02-18 23:25:54 -050013#
James E. King, III0ad20bd2017-09-30 15:44:16 -070014# Apache Thrift Docker build environment for Ubuntu Trusty
15# Using all stock Ubuntu Trusty packaging except for:
16# - d: does not come with Ubuntu so we're installing 2.070.0
17# - dart: does not come with Ubuntu so we're installing 1.20.1
18# - dotnetcore, disabled because netcore is for 1.0.0-preview and 2.0.0 is out
19# - haxe, disabled because the distro comes with 3.0.0 and it cores while installing
20# - node.js, disabled because it is at 0.10.0 in the distro which is too old (need 4+)
21# - ocaml, disabled because it fails to install properly
22#
jfarrelle03f7e82015-02-18 23:25:54 -050023
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +090024FROM buildpack-deps:trusty-scm
jfarrelle03f7e82015-02-18 23:25:54 -050025MAINTAINER Apache Thrift <dev@thrift.apache.org>
jfarrelle03f7e82015-02-18 23:25:54 -050026ENV DEBIAN_FRONTEND noninteractive
27
Robert Lua15060a2017-12-28 15:29:39 +080028RUN apt-get update && \
29 apt-get dist-upgrade -y && \
James E. King, III0ad20bd2017-09-30 15:44:16 -070030 apt-get install -y --no-install-recommends \
31 apt \
32 apt-transport-https \
33 apt-utils \
34 curl \
35 dirmngr \
36 software-properties-common \
37 wget
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +090038
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +090039RUN apt-get update && apt-get install -y --no-install-recommends \
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +090040`# General dependencies` \
James E. King, III0ad20bd2017-09-30 15:44:16 -070041 bash-completion \
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +090042 bison \
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +090043 build-essential \
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +090044 clang \
45 cmake \
46 debhelper \
47 flex \
James E. King, III0ad20bd2017-09-30 15:44:16 -070048 gdb \
49 llvm \
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +090050 ninja-build \
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +090051 pkg-config \
James E. King, III0ad20bd2017-09-30 15:44:16 -070052 valgrind \
53 vim
54ENV PATH /usr/lib/llvm-3.8/bin:$PATH
jfarrelle03f7e82015-02-18 23:25:54 -050055
James E. King, III43e959b2017-04-04 13:04:29 -040056RUN apt-get install -y --no-install-recommends \
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +090057`# C++ dependencies` \
James E. King, III0ad20bd2017-09-30 15:44:16 -070058 libboost-all-dev \
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +090059 libevent-dev \
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +090060 libssl-dev \
61 qt5-default \
62 qtbase5-dev \
63 qtbase5-dev-tools
jfarrelle03f7e82015-02-18 23:25:54 -050064
James E. King, III43e959b2017-04-04 13:04:29 -040065RUN apt-get install -y --no-install-recommends \
James E. King, III0ad20bd2017-09-30 15:44:16 -070066`# csharp (mono) dependencies` \
67 mono-devel
68
69RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EBCF975E5BA24D5E && \
70 wget http://master.dl.sourceforge.net/project/d-apt/files/d-apt.list -O /etc/apt/sources.list.d/d-apt.list && \
71 wget -qO - https://dlang.org/d-keyring.gpg | apt-key add - && \
72 apt-get update && \
73 apt-get install -y --no-install-recommends \
74`# D dependencies` \
75 dmd-bin=2.070.2-0 \
76 libphobos2-dev=2.070.2-0 \
77 dub \
78 dfmt \
79 dscanner \
80 xdg-utils
81# RUN mkdir -p /usr/include/dmd/druntime/import/deimos /usr/include/dmd/druntime/import/C && \
82# curl -sSL https://github.com/D-Programming-Deimos/libevent/archive/master.tar.gz| tar xz && \
83# mv libevent-master/deimos/* /usr/include/dmd/druntime/import/deimos/ && \
84# mv libevent-master/C/* /usr/include/dmd/druntime/import/C/ && \
85# rm -rf libevent-master
86# RUN curl -sSL https://github.com/D-Programming-Deimos/openssl/archive/master.tar.gz| tar xz && \
87# mv openssl-master/deimos/* /usr/include/dmd/druntime/import/deimos/ && \
88# mv openssl-master/C/* /usr/include/dmd/druntime/import/C/ && \
89# rm -rf openssl-master
90
91RUN curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
92 curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list && \
93 apt-get update && \
94 apt-get install -y --no-install-recommends \
95`# Dart dependencies` \
96 dart=1.20.1-1
97ENV PATH /usr/lib/dart/bin:$PATH
98
99RUN apt-get install -y --no-install-recommends \
100`# Erlang dependencies` \
101 erlang-base \
102 erlang-eunit \
103 erlang-dev \
104 erlang-tools \
105 rebar
106
107RUN apt-get install -y --no-install-recommends \
108`# GlibC dependencies` \
109 libglib2.0-dev
110
111RUN apt-get install -y --no-install-recommends \
112`# golang (go) dependencies` \
113 golang-go
114
115RUN apt-get install -y --no-install-recommends \
116`# Haskell dependencies` \
117 ghc \
118 cabal-install
119
120# disabled because it cores while installing
121# RUN apt-get install -y --no-install-recommends \
122# `# Haxe dependencies` \
123# haxe \
124# neko \
125# neko-dev && \
126# haxelib setup /usr/share/haxe/lib && \
127# haxelib install hxcpp 3.2.102
128
129RUN apt-get install -y --no-install-recommends \
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +0900130`# Java dependencies` \
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +0900131 ant \
Nobuaki Sukegawa6bb12772016-03-08 01:55:31 +0900132 ant-optional \
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +0900133 openjdk-7-jdk \
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +0900134 maven
jfarrelle03f7e82015-02-18 23:25:54 -0500135
James E. King, III43e959b2017-04-04 13:04:29 -0400136RUN apt-get install -y --no-install-recommends \
James E. King, III0ad20bd2017-09-30 15:44:16 -0700137`# Lua dependencies` \
138 lua5.1 \
139 lua5.1-dev
140
141# disabled because it is too old
142# RUN apt-get install -y --no-install-recommends \
143# `# Node.js dependencies` \
144# nodejs \
145# npm
146
147# disabled because it fails to install properly
148# RUN apt-get install -y --no-install-recommends \
149# `# OCaml dependencies` \
150# ocaml \
151# opam && \
152# opam init --yes && \
153# opam install --yes oasis
jfarrelle03f7e82015-02-18 23:25:54 -0500154
James E. King, III43e959b2017-04-04 13:04:29 -0400155RUN apt-get install -y --no-install-recommends \
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +0900156`# Perl dependencies` \
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +0900157 libbit-vector-perl \
158 libclass-accessor-class-perl \
159 libcrypt-ssleay-perl \
160 libio-socket-ssl-perl \
161 libnet-ssleay-perl
jfarrelle03f7e82015-02-18 23:25:54 -0500162
James E. King, III43e959b2017-04-04 13:04:29 -0400163RUN apt-get install -y --no-install-recommends \
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +0900164`# Php dependencies` \
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +0900165 php5 \
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +0900166 php5-cli \
James E. King, III0ad20bd2017-09-30 15:44:16 -0700167 php5-dev \
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +0900168 php-pear \
Robert Lua15060a2017-12-28 15:29:39 +0800169 re2c && \
170 wget https://getcomposer.org/installer -O - -q | php -- --quiet --install-dir=/usr/local/bin/ --filename=composer
jfarrelle03f7e82015-02-18 23:25:54 -0500171
James E. King, III43e959b2017-04-04 13:04:29 -0400172RUN apt-get install -y --no-install-recommends \
James E. King, III0ad20bd2017-09-30 15:44:16 -0700173`# Python dependencies` \
174 python-all \
175 python-all-dbg \
176 python-all-dev \
177 python-pip \
178 python-setuptools \
179 python-six \
180 python-twisted \
181 python-wheel \
182 python-zope.interface \
183 python3-all \
184 python3-all-dbg \
185 python3-all-dev \
186 python3-pip \
187 python3-setuptools \
188 python3-six \
189 python3-wheel \
190 python3-zope.interface && \
191 pip install -U ipaddress backports.ssl_match_hostname tornado && \
Robert Lua15060a2017-12-28 15:29:39 +0800192 pip3 install -U backports.ssl_match_hostname tornado
James E. King, III0ad20bd2017-09-30 15:44:16 -0700193# installing tornado by pip/pip3 instead of debian package
194# if we install the debian package, the build fails in py2
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +0900195
James E. King, III43e959b2017-04-04 13:04:29 -0400196RUN apt-get install -y --no-install-recommends \
James E. King, III0ad20bd2017-09-30 15:44:16 -0700197`# Ruby dependencies` \
198 ruby \
199 ruby-dev \
200 ruby-bundler
201RUN gem install bundler --no-ri --no-rdoc
202
203RUN apt-get install -y --no-install-recommends \
204`# Rust dependencies` \
205 cargo \
206 rustc
207
208RUN apt-get install -y --no-install-recommends \
209`# Static Code Analysis dependencies` \
210 cppcheck \
211 sloccount && \
212 pip install flake8
213
214# Clean up
215RUN rm -rf /var/cache/apt/* && \
Nobuaki Sukegawa7be78ea2016-05-15 00:25:04 +0900216 rm -rf /var/lib/apt/lists/* && \
217 rm -rf /tmp/* && \
218 rm -rf /var/tmp/*
219
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +0900220ENV THRIFT_ROOT /thrift
221RUN mkdir -p $THRIFT_ROOT/src
Nobuaki Sukegawa93fb7ea2016-09-04 17:00:11 +0900222COPY Dockerfile $THRIFT_ROOT/
Nobuaki Sukegawaa6ab1f52015-11-28 15:04:39 +0900223WORKDIR $THRIFT_ROOT/src