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# 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: dmd does not come with Ubuntu 18# - dart: does not come with Ubuntu. Pinned to last 1.x release 19# - dotnet: does not come with Ubuntu 20# - haxe: version 3.4.2 that comes with Ubuntu cores in our CI build 21# - go: artful comes with 1.9, we want the latest (supported) 22# - nodejs: want v8, artful comes with v6 23# 24 25FROM buildpack-deps:artful-scm 26MAINTAINER Apache Thrift <dev@thrift.apache.org> 27ENV DEBIAN_FRONTEND noninteractive 28 29### Add apt repos 30 31RUN apt-get update && \ 32 apt-get dist-upgrade -y && \ 33 apt-get install -y --no-install-recommends \ 34 apt \ 35 apt-transport-https \ 36 apt-utils \ 37 curl \ 38 dirmngr \ 39 software-properties-common \ 40 wget 41 42# Dart 43RUN curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \ 44 curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > \ 45 /etc/apt/sources.list.d/dart_stable.list 46ENV DART_VERSION 1.24.3-1 47 48# dotnet (netcore) 49RUN curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > /etc/apt/trusted.gpg.d/microsoft.gpg && \ 50 echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-artful-prod artful main" > \ 51 /etc/apt/sources.list.d/dotnetdev.list 52 53# haxe (https://haxe.org/download/linux/) 54RUN add-apt-repository ppa:haxe/releases -y 55 56# node.js 57RUN curl -sL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \ 58 echo "deb https://deb.nodesource.com/node_8.x artful main" | tee /etc/apt/sources.list.d/nodesource.list 59 60### install general dependencies 61RUN apt-get update && apt-get install -y --no-install-recommends \ 62`# General dependencies` \ 63 bash-completion \ 64 bison \ 65 build-essential \ 66 clang \ 67 cmake \ 68 debhelper \ 69 flex \ 70 gdb \ 71 llvm \ 72 ninja-build \ 73 pkg-config \ 74 valgrind \ 75 vim 76ENV PATH /usr/lib/llvm-3.8/bin:$PATH 77 78# boost-1.62 has a terrible bug in boost::test, see https://svn.boost.org/trac10/ticket/12507 79RUN apt-get install -y --no-install-recommends \ 80`# C++ dependencies` \ 81 libboost1.63-all-dev \ 82 libevent-dev \ 83 libssl-dev \ 84 qt5-default \ 85 qtbase5-dev \ 86 qtbase5-dev-tools 87 88ENV SBCL_VERSION 1.4.5 89RUN \ 90`# Common Lisp (sbcl) dependencies` \ 91 curl --version && \ 92 curl -O -J -L https://kent.dl.sourceforge.net/project/sbcl/sbcl/${SBCL_VERSION}/sbcl-${SBCL_VERSION}-x86-64-linux-binary.tar.bz2 && \ 93 tar xjf sbcl-${SBCL_VERSION}-x86-64-linux-binary.tar.bz2 && \ 94 cd sbcl-${SBCL_VERSION}-x86-64-linux && \ 95 ./install.sh && \ 96 sbcl --version && \ 97 rm -rf sbcl* 98 99ENV D_VERSION 2.080.0 100ENV DMD_DEB dmd_2.080.0-0_amd64.deb 101RUN \ 102`# D dependencies` \ 103 wget -q http://downloads.dlang.org/releases/2.x/${D_VERSION}/${DMD_DEB} && \ 104 dpkg --install ${DMD_DEB} && \ 105 rm -f ${DMD_DEB} && \ 106 mkdir -p /usr/include/dmd/druntime/import/deimos /usr/include/dmd/druntime/import/C && \ 107 curl -sSL https://github.com/D-Programming-Deimos/libevent/archive/master.tar.gz| tar xz && \ 108 mv libevent-master/deimos/* /usr/include/dmd/druntime/import/deimos/ && \ 109 mv libevent-master/C/* /usr/include/dmd/druntime/import/C/ && \ 110 rm -rf libevent-master && \ 111 curl -sSL https://github.com/D-Programming-Deimos/openssl/archive/master.tar.gz| tar xz && \ 112 mv openssl-master/deimos/* /usr/include/dmd/druntime/import/deimos/ && \ 113 mv openssl-master/C/* /usr/include/dmd/druntime/import/C/ && \ 114 rm -rf openssl-master 115 116RUN apt-get install -y --no-install-recommends \ 117 `# Dart dependencies` \ 118 dart=$DART_VERSION 119ENV PATH /usr/lib/dart/bin:$PATH 120 121RUN apt-get install -y --no-install-recommends \ 122`# dotnet core dependencies` \ 123 dotnet-sdk-2.1.4 124 125RUN apt-get install -y --no-install-recommends \ 126`# Erlang dependencies` \ 127 erlang-base \ 128 erlang-eunit \ 129 erlang-dev \ 130 erlang-tools \ 131 rebar 132 133RUN apt-get install -y --no-install-recommends \ 134`# GlibC dependencies` \ 135 libglib2.0-dev 136 137# golang 138ENV GOLANG_VERSION 1.10 139ENV GOLANG_DOWNLOAD_URL https://golang.org/dl/go$GOLANG_VERSION.linux-amd64.tar.gz 140ENV GOLANG_DOWNLOAD_SHA256 b5a64335f1490277b585832d1f6c7f8c6c11206cba5cd3f771dcb87b98ad1a33 141RUN curl -fsSL "$GOLANG_DOWNLOAD_URL" -o golang.tar.gz && \ 142 echo "$GOLANG_DOWNLOAD_SHA256 golang.tar.gz" | sha256sum -c - && \ 143 tar -C /usr/local -xzf golang.tar.gz && \ 144 ln -s /usr/local/go/bin/go /usr/local/bin && \ 145 rm golang.tar.gz 146 147RUN apt-get install -y --no-install-recommends \ 148`# Haskell dependencies` \ 149 ghc \ 150 cabal-install 151 152RUN apt-get install -y --no-install-recommends \ 153`# Haxe dependencies` \ 154 haxe \ 155 neko \ 156 neko-dev && \ 157 haxelib setup --always /usr/share/haxe/lib && \ 158 haxelib install --always hxcpp 2>&1 > /dev/null 159 160RUN apt-get install -y --no-install-recommends \ 161`# Java dependencies` \ 162 ant \ 163 ant-optional \ 164 openjdk-8-jdk \ 165 maven 166 167RUN apt-get install -y --no-install-recommends \ 168`# Lua dependencies` \ 169 lua5.2 \ 170 lua5.2-dev 171# https://bugs.launchpad.net/ubuntu/+source/lua5.3/+bug/1707212 172# lua5.3 does not install alternatives! 173# need to update our luasocket code, lua doesn't have luaL_openlib any more 174 175RUN apt-get install -y --no-install-recommends \ 176`# Node.js dependencies` \ 177 nodejs 178 179# Test dependencies for running puppeteer 180RUN apt-get install -y --no-install-recommends \ 181`# JS dependencies` \ 182 libxss1 183 184RUN apt-get install -y --no-install-recommends \ 185`# OCaml dependencies` \ 186 ocaml \ 187 opam && \ 188 opam init --yes && \ 189 opam install --yes oasis 190 191RUN apt-get install -y --no-install-recommends \ 192`# Perl dependencies` \ 193 libbit-vector-perl \ 194 libclass-accessor-class-perl \ 195 libcrypt-ssleay-perl \ 196 libio-socket-ssl-perl \ 197 libnet-ssleay-perl 198 199RUN apt-get install -y --no-install-recommends \ 200`# Php dependencies` \ 201 php \ 202 php-cli \ 203 php-dev \ 204 php-pear \ 205 re2c \ 206 composer 207 208RUN apt-get install -y --no-install-recommends \ 209`# Python dependencies` \ 210 python-all \ 211 python-all-dbg \ 212 python-all-dev \ 213 python-ipaddress \ 214 python-pip \ 215 python-setuptools \ 216 python-six \ 217 python-tornado \ 218 python-twisted \ 219 python-wheel \ 220 python-zope.interface && \ 221 pip install --upgrade backports.ssl_match_hostname 222 223RUN apt-get install -y --no-install-recommends \ 224`# Python3 dependencies` \ 225 python3-all \ 226 python3-all-dbg \ 227 python3-all-dev \ 228 python3-pip \ 229 python3-setuptools \ 230 python3-six \ 231 python3-tornado \ 232 python3-twisted \ 233 python3-wheel \ 234 python3-zope.interface 235 236RUN apt-get install -y --no-install-recommends \ 237`# Ruby dependencies` \ 238 ruby \ 239 ruby-dev \ 240 ruby-bundler 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 263