blob: 503eecd4240596633668032a14a2273e29e63ed3 [file] [log] [blame]
James E. King, IIIb66b66f2017-08-31 18:07:40 -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
James E. King, IIId7142b72017-09-01 13:00:36 -070013# Apache Thrift Docker build environment for Debian Stretch
14#
15# Known issues:
16# - d: deimos for libevent and openssl disabled - build errors
17# - dotnetcore, because netcore is for 1.0.0-preview and 2.0.0 is out
18# - rust: cargo not in debian repo - perhaps not needed?
James E. King, IIIb66b66f2017-08-31 18:07:40 -070019
James E. King, IIId7142b72017-09-01 13:00:36 -070020FROM buildpack-deps:stretch-scm
James E. King, IIIb66b66f2017-08-31 18:07:40 -070021MAINTAINER Apache Thrift <dev@thrift.apache.org>
22
23ENV DEBIAN_FRONTEND noninteractive
24
James E. King, IIId7142b72017-09-01 13:00:36 -070025### Add apt repos
James E. King, IIIb66b66f2017-08-31 18:07:40 -070026
27RUN apt-get update && apt-get install -y --no-install-recommends apt apt-transport-https curl wget apt-utils
28
James E. King, IIIb66b66f2017-08-31 18:07:40 -070029# D
30RUN wget http://master.dl.sourceforge.net/project/d-apt/files/d-apt.list -O /etc/apt/sources.list.d/d-apt.list && \
31 apt-get update && apt-get -y --allow-unauthenticated install --reinstall d-apt-keyring
32
33# Dart
34RUN curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
35 curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list && \
36 sed -i /etc/apt/sources.list.d/dart_stable.list -e 's/https:/http:/g'
37
James E. King, IIId7142b72017-09-01 13:00:36 -070038# dotnet (core) 2.0.0 - project isn't ready for this yet:
39# RUN curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > /etc/apt/trusted.gpg.d/microsoft.gpg && \
40# echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-xenial-prod xenial main" > /etc/apt/sources.list.d/dotnetdev.list
James E. King, IIIb66b66f2017-08-31 18:07:40 -070041
42# node.js (this step runs apt-get update internally)
43RUN curl -sL https://deb.nodesource.com/setup_8.x | bash
44
James E. King, IIId7142b72017-09-01 13:00:36 -070045
46### install general dependencies
James E. King, IIIb66b66f2017-08-31 18:07:40 -070047RUN apt-get install -y --no-install-recommends \
48`# General dependencies` \
James E. King, IIIf4543692017-09-01 05:23:29 -070049 bash-completion \
James E. King, IIIb66b66f2017-08-31 18:07:40 -070050 bison \
51 build-essential \
52 clang \
53 cmake \
54 debhelper \
55 flex \
James E. King, IIId7142b72017-09-01 13:00:36 -070056 gdb \
James E. King, IIIb66b66f2017-08-31 18:07:40 -070057 ninja-build \
58 pkg-config \
James E. King, III7d211b82017-09-06 10:12:02 -070059 valgrind \
James E. King, IIIb66b66f2017-08-31 18:07:40 -070060 vim
61
James E. King, IIId7142b72017-09-01 13:00:36 -070062
63### languages
James E. King, IIIb66b66f2017-08-31 18:07:40 -070064
65RUN apt-get install -y --no-install-recommends \
66`# C++ dependencies` \
67 libboost-dev \
68 libboost-filesystem-dev \
69 libboost-program-options-dev \
70 libboost-system-dev \
71 libboost-test-dev \
72 libboost-thread-dev \
73 libevent-dev \
74 libssl-dev \
75 qt5-default \
76 qtbase5-dev \
77 qtbase5-dev-tools
78
79RUN apt-get install -y --no-install-recommends \
James E. King, IIIf4543692017-09-01 05:23:29 -070080`# csharp (mono) dependencies` \
James E. King, IIIb66b66f2017-08-31 18:07:40 -070081 mono-devel
82
83RUN apt-get install -y --no-install-recommends \
84`# D dependencies` \
85 dmd-bin \
86 libevent-dev \
87 libssl-dev \
88 xdg-utils
James E. King, IIId7142b72017-09-01 13:00:36 -070089# libevent deimos disabled - build errors
90# RUN mkdir -p /usr/include/dmd/druntime/import/deimos /usr/include/dmd/druntime/import/C && \
91# curl -sSL https://github.com/D-Programming-Deimos/libevent/archive/master.tar.gz| tar xz && \
92# mv libevent-master/deimos/* /usr/include/dmd/druntime/import/deimos/ && \
93# mv libevent-master/C/* /usr/include/dmd/druntime/import/C/ && \
94# rm -rf libevent-master
95# openssl deimos doesn't work with openssl-1.1.0 - disabling it for now:
96# RUN curl -sSL https://github.com/D-Programming-Deimos/openssl/archive/master.tar.gz| tar xz && \
97# mv openssl-master/deimos/* /usr/include/dmd/druntime/import/deimos/ && \
98# mv openssl-master/C/* /usr/include/dmd/druntime/import/C/ && \
99# rm -rf openssl-master
James E. King, IIIb66b66f2017-08-31 18:07:40 -0700100
101RUN apt-get install -y --no-install-recommends \
102`# Dart dependencies` \
103 dart
104ENV PATH /usr/lib/dart/bin:$PATH
105
James E. King, IIId7142b72017-09-01 13:00:36 -0700106# project isn't ready for this quite yet:
107# RUN apt-get install -y --no-install-recommends \
108# `# dotnet core dependencies` \
109# dotnet-sdk-2.0.0
James E. King, IIIb66b66f2017-08-31 18:07:40 -0700110
111RUN apt-get install -y --no-install-recommends \
112`# Erlang dependencies` \
113 erlang-base \
114 erlang-eunit \
115 erlang-dev \
116 erlang-tools \
117 rebar
118
119RUN apt-get install -y --no-install-recommends \
120`# GlibC dependencies` \
121 libglib2.0-dev
122
123RUN apt-get install -y --no-install-recommends \
124`# golang (go) dependencies` \
James E. King, IIId7142b72017-09-01 13:00:36 -0700125 golang-go
James E. King, IIIb66b66f2017-08-31 18:07:40 -0700126
127RUN apt-get install -y --no-install-recommends \
128`# Haskell dependencies` \
129 ghc \
130 cabal-install
131
132RUN apt-get install -y --no-install-recommends \
133`# Haxe dependencies` \
134 haxe \
135 neko \
James E. King, IIId7142b72017-09-01 13:00:36 -0700136 neko-dev
137RUN haxelib setup --always /usr/share/haxe/lib && \
James E. King, IIIb66b66f2017-08-31 18:07:40 -0700138 haxelib install --always hxcpp
139
140RUN apt-get install -y --no-install-recommends \
141`# Java dependencies` \
142 ant \
143 ant-optional \
144 openjdk-8-jdk \
145 maven
146
147RUN apt-get install -y --no-install-recommends \
148`# Lua dependencies` \
James E. King, IIId7142b72017-09-01 13:00:36 -0700149 lua5.2 \
150 lua5.2-dev
151# https://bugs.launchpad.net/ubuntu/+source/lua5.3/+bug/1707212
152# same for debian stretch
153# lua5.3 does not install alternatives so stick with 5.2 here
James E. King, IIIb66b66f2017-08-31 18:07:40 -0700154
155RUN apt-get install -y --no-install-recommends \
156`# Node.js dependencies` \
157 nodejs
158
159RUN apt-get install -y --no-install-recommends \
160`# OCaml dependencies` \
James E. King, IIId7142b72017-09-01 13:00:36 -0700161 ocaml \
162 opam && \
163 opam init --yes && \
164 opam install --yes oasis
James E. King, IIIb66b66f2017-08-31 18:07:40 -0700165
166RUN apt-get install -y --no-install-recommends \
167`# Perl dependencies` \
168 libbit-vector-perl \
169 libclass-accessor-class-perl \
170 libcrypt-ssleay-perl \
171 libio-socket-ssl-perl \
172 libnet-ssleay-perl
173
174RUN apt-get install -y --no-install-recommends \
175`# Php dependencies` \
176 php7.0 \
177 php7.0-cli \
178 php7.0-dev \
179 php-pear \
180 re2c \
181 phpunit
182
183RUN apt-get install -y --no-install-recommends \
184`# Python dependencies` \
185 python-all \
186 python-all-dbg \
187 python-all-dev \
188 python-backports.ssl-match-hostname \
189 python-ipaddress \
190 python-pip \
191 python-setuptools \
James E. King, IIId7142b72017-09-01 13:00:36 -0700192 python-six \
James E. King, IIIb66b66f2017-08-31 18:07:40 -0700193 python-tornado \
194 python-twisted \
James E. King, IIId7142b72017-09-01 13:00:36 -0700195 python-wheel \
James E. King, IIIb66b66f2017-08-31 18:07:40 -0700196 python-zope.interface \
197 python3-all \
198 python3-all-dbg \
199 python3-all-dev \
James E. King, IIIb66b66f2017-08-31 18:07:40 -0700200 python3-setuptools \
James E. King, IIId7142b72017-09-01 13:00:36 -0700201 python3-six \
202 python3-tornado \
203 python3-twisted \
204 python3-wheel \
205 python3-zope.interface && \
206 pip install --upgrade backports.ssl_match_hostname
James E. King, IIIb66b66f2017-08-31 18:07:40 -0700207
208RUN apt-get install -y --no-install-recommends \
209`# Ruby dependencies` \
210 ruby \
211 ruby-dev \
212 ruby-bundler
213RUN gem install bundler --no-ri --no-rdoc
214
215RUN apt-get install -y --no-install-recommends \
216`# Rust dependencies` \
James E. King, IIIb66b66f2017-08-31 18:07:40 -0700217 rustc
218
James E. King, IIId7142b72017-09-01 13:00:36 -0700219# Update anything else left hanging
James E. King, IIIb66b66f2017-08-31 18:07:40 -0700220RUN apt-get dist-upgrade -y
221
James E. King, IIId7142b72017-09-01 13:00:36 -0700222# Clean up
223RUN rm -rf /var/cache/apt/* && \
James E. King, IIIb66b66f2017-08-31 18:07:40 -0700224 rm -rf /var/lib/apt/lists/* && \
225 rm -rf /tmp/* && \
226 rm -rf /var/tmp/*
227
228ENV THRIFT_ROOT /thrift
229RUN mkdir -p $THRIFT_ROOT/src
230COPY Dockerfile $THRIFT_ROOT/
231WORKDIR $THRIFT_ROOT/src