1# 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# 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? 19 20FROM buildpack-deps:stretch-scm 21MAINTAINER Apache Thrift <dev@thrift.apache.org> 22 23ENV DEBIAN_FRONTEND noninteractive 24 25### Add apt repos 26 27RUN apt-get update && apt-get install -y --no-install-recommends apt apt-transport-https curl wget apt-utils 28 29# 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 38# 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 41 42# node.js (this step runs apt-get update internally) 43RUN curl -sL https://deb.nodesource.com/setup_8.x | bash 44 45 46### install general dependencies 47RUN apt-get install -y --no-install-recommends \ 48`# General dependencies` \ 49 bash-completion \ 50 bison \ 51 build-essential \ 52 clang \ 53 cmake \ 54 debhelper \ 55 flex \ 56 gdb \ 57 ninja-build \ 58 pkg-config \ 59 valgrind \ 60 vim 61 62 63### languages 64 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 \ 80`# D dependencies` \ 81 dmd-bin \ 82 libevent-dev \ 83 libssl-dev \ 84 xdg-utils 85# libevent deimos disabled - build errors 86# RUN mkdir -p /usr/include/dmd/druntime/import/deimos /usr/include/dmd/druntime/import/C && \ 87# curl -sSL https://github.com/D-Programming-Deimos/libevent/archive/master.tar.gz| tar xz && \ 88# mv libevent-master/deimos/* /usr/include/dmd/druntime/import/deimos/ && \ 89# mv libevent-master/C/* /usr/include/dmd/druntime/import/C/ && \ 90# rm -rf libevent-master 91# openssl deimos doesn't work with openssl-1.1.0 - disabling it for now: 92# RUN curl -sSL https://github.com/D-Programming-Deimos/openssl/archive/master.tar.gz| tar xz && \ 93# mv openssl-master/deimos/* /usr/include/dmd/druntime/import/deimos/ && \ 94# mv openssl-master/C/* /usr/include/dmd/druntime/import/C/ && \ 95# rm -rf openssl-master 96 97RUN apt-get install -y --no-install-recommends \ 98`# Dart dependencies` \ 99 dart 100ENV PATH /usr/lib/dart/bin:$PATH 101 102# project isn't ready for this quite yet: 103# RUN apt-get install -y --no-install-recommends \ 104# `# dotnet core dependencies` \ 105# dotnet-sdk-6.0 \ 106# dotnet-runtime-6.0 \ 107# aspnetcore-runtime-6.0 \ 108# dotnet-apphost-pack-6.0 109 110RUN apt-get install -y --no-install-recommends \ 111`# Erlang dependencies` \ 112 erlang-base \ 113 erlang-eunit \ 114 erlang-dev \ 115 erlang-tools \ 116 rebar 117 118RUN apt-get install -y --no-install-recommends \ 119`# GlibC dependencies` \ 120 libglib2.0-dev 121 122RUN apt-get install -y --no-install-recommends \ 123`# golang (go) dependencies` \ 124 golang-go 125 126RUN apt-get install -y --no-install-recommends \ 127`# Haxe dependencies` \ 128 haxe \ 129 neko \ 130 neko-dev 131RUN haxelib setup --always /usr/share/haxe/lib && \ 132 haxelib install --always hxcpp 133 134RUN apt-get install -y --no-install-recommends \ 135`# Java dependencies` \ 136 ant \ 137 ant-optional \ 138 openjdk-8-jdk \ 139 maven 140 141RUN apt-get install -y --no-install-recommends \ 142`# Lua dependencies` \ 143 lua5.2 \ 144 lua5.2-dev 145# https://bugs.launchpad.net/ubuntu/+source/lua5.3/+bug/1707212 146# same for debian stretch 147# lua5.3 does not install alternatives so stick with 5.2 here 148 149RUN apt-get install -y --no-install-recommends \ 150`# Node.js dependencies` \ 151 nodejs 152 153RUN apt-get install -y --no-install-recommends \ 154`# OCaml dependencies` \ 155 ocaml \ 156 opam && \ 157 opam init --yes && \ 158 opam install --yes oasis 159 160RUN apt-get install -y --no-install-recommends \ 161`# Perl dependencies` \ 162 libbit-vector-perl \ 163 libclass-accessor-class-perl \ 164 libcrypt-ssleay-perl \ 165 libio-socket-ssl-perl \ 166 libnet-ssleay-perl 167 168RUN apt-get install -y --no-install-recommends \ 169`# Php dependencies` \ 170 php7.0 \ 171 php7.0-cli \ 172 php7.0-dev \ 173 php-pear \ 174 re2c \ 175 phpunit 176 177RUN apt-get install -y --no-install-recommends \ 178`# Python dependencies` \ 179 python-all \ 180 python-all-dbg \ 181 python-all-dev \ 182 python-backports.ssl-match-hostname \ 183 python-ipaddress \ 184 python-pip \ 185 python-setuptools \ 186 python-six \ 187 python-tornado \ 188 python-twisted \ 189 python-wheel \ 190 python-zope.interface \ 191 python3-all \ 192 python3-all-dbg \ 193 python3-all-dev \ 194 python3-setuptools \ 195 python3-six \ 196 python3-tornado \ 197 python3-twisted \ 198 python3-wheel \ 199 python3-zope.interface && \ 200 pip install --upgrade backports.ssl_match_hostname 201 202RUN apt-get install -y --no-install-recommends \ 203`# Ruby dependencies` \ 204 ruby \ 205 ruby-dev \ 206 ruby-bundler 207RUN gem install bundler --no-ri --no-rdoc 208 209RUN apt-get install -y --no-install-recommends \ 210`# Rust dependencies` \ 211 rustc 212 213# Update anything else left hanging 214RUN apt-get dist-upgrade -y 215 216# Clean up 217RUN rm -rf /var/cache/apt/* && \ 218 rm -rf /var/lib/apt/lists/* && \ 219 rm -rf /tmp/* && \ 220 rm -rf /var/tmp/* 221 222ENV THRIFT_ROOT /thrift 223RUN mkdir -p $THRIFT_ROOT/src 224COPY Dockerfile $THRIFT_ROOT/ 225WORKDIR $THRIFT_ROOT/src 226