James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 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: does not come with Ubuntu so we're installing the latest |
| 18 | # - d: deimos for libevent and openssl omitted - not compatible / build errors |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 19 | # - haxe: see THRIFT-4352, but test/haxe cores during testing |
| 20 | # and hxcpp 3.4.64 is not compatible with artful |
| 21 | # |
| 22 | |
| 23 | FROM buildpack-deps:artful-scm |
| 24 | MAINTAINER Apache Thrift <dev@thrift.apache.org> |
| 25 | ENV DEBIAN_FRONTEND noninteractive |
| 26 | |
| 27 | RUN apt-get update && \ |
| 28 | apt-get dist-upgrade -y && \ |
| 29 | apt-get install -y --no-install-recommends \ |
| 30 | apt \ |
| 31 | apt-transport-https \ |
| 32 | apt-utils \ |
| 33 | curl \ |
| 34 | dirmngr \ |
| 35 | software-properties-common \ |
| 36 | wget |
| 37 | |
| 38 | # csharp (mono) - if we ever want a later version |
| 39 | # RUN echo "deb http://download.mono-project.com/repo/debian xenial main" | tee /etc/apt/sources.list.d/mono.list && \ |
| 40 | # apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A6A19B38D3D831EF |
| 41 | |
James E. King, III | 6e883f9 | 2017-11-18 21:18:05 -0500 | [diff] [blame] | 42 | # dotnet (core) |
| 43 | RUN curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > /etc/apt/trusted.gpg.d/microsoft.gpg && \ |
| 44 | echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-artful-prod artful main" > /etc/apt/sources.list.d/dotnetdev.list |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 45 | |
| 46 | # node.js (this step runs apt-get update internally) - if we ever want a later version |
James E. King, III | 619218c | 2017-10-29 06:55:00 -0400 | [diff] [blame] | 47 | RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 48 | |
| 49 | ### install general dependencies |
| 50 | RUN apt-get install -y --no-install-recommends \ |
| 51 | `# General dependencies` \ |
| 52 | bash-completion \ |
| 53 | bison \ |
| 54 | build-essential \ |
| 55 | clang \ |
| 56 | cmake \ |
| 57 | debhelper \ |
| 58 | flex \ |
| 59 | gdb \ |
| 60 | llvm \ |
| 61 | ninja-build \ |
| 62 | pkg-config \ |
| 63 | valgrind \ |
| 64 | vim |
| 65 | ENV PATH /usr/lib/llvm-3.8/bin:$PATH |
| 66 | |
| 67 | # boost-1.62 has a terrible bug in boost::test, see https://svn.boost.org/trac10/ticket/12507 |
| 68 | RUN apt-get install -y --no-install-recommends \ |
| 69 | `# C++ dependencies` \ |
| 70 | libboost1.63-all-dev \ |
| 71 | libevent-dev \ |
| 72 | libssl-dev \ |
| 73 | qt5-default \ |
| 74 | qtbase5-dev \ |
| 75 | qtbase5-dev-tools |
| 76 | |
| 77 | RUN apt-get install -y --no-install-recommends \ |
| 78 | `# csharp (mono) dependencies` \ |
| 79 | mono-devel |
| 80 | |
| 81 | RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EBCF975E5BA24D5E && \ |
| 82 | wget http://master.dl.sourceforge.net/project/d-apt/files/d-apt.list -O /etc/apt/sources.list.d/d-apt.list && \ |
| 83 | wget -qO - https://dlang.org/d-keyring.gpg | apt-key add - && \ |
| 84 | apt-get update && \ |
| 85 | apt-get install -y --no-install-recommends \ |
| 86 | `# D dependencies` \ |
| 87 | dmd-bin \ |
| 88 | libphobos2-dev \ |
| 89 | dub \ |
| 90 | dfmt \ |
| 91 | dscanner \ |
| 92 | libevent-dev \ |
| 93 | libssl-dev \ |
| 94 | xdg-utils |
| 95 | # libevent deimos doesn't seem to work so not enabling it: |
| 96 | # RUN mkdir -p /usr/include/dmd/druntime/import/deimos /usr/include/dmd/druntime/import/C && \ |
| 97 | # curl -sSL https://github.com/D-Programming-Deimos/libevent/archive/master.tar.gz| tar xz && \ |
| 98 | # mv libevent-master/deimos/* /usr/include/dmd/druntime/import/deimos/ && \ |
| 99 | # mv libevent-master/C/* /usr/include/dmd/druntime/import/C/ && \ |
| 100 | # rm -rf libevent-master |
| 101 | # openssl deimos doesn't work with openssl-1.0.2 so not enabling it: |
| 102 | # RUN curl -sSL https://github.com/D-Programming-Deimos/openssl/archive/master.tar.gz| tar xz && \ |
| 103 | # mv openssl-master/deimos/* /usr/include/dmd/druntime/import/deimos/ && \ |
| 104 | # mv openssl-master/C/* /usr/include/dmd/druntime/import/C/ && \ |
| 105 | # rm -rf openssl-master |
| 106 | |
Robert Lu | c72d8dc | 2017-12-29 04:14:38 +0800 | [diff] [blame^] | 107 | RUN curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \ |
| 108 | curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list && \ |
| 109 | apt-get update && \ |
| 110 | apt-get install -y --no-install-recommends \ |
| 111 | `# Dart dependencies` \ |
| 112 | dart/stable |
James E. King, III | 6e883f9 | 2017-11-18 21:18:05 -0500 | [diff] [blame] | 113 | ENV PATH /usr/lib/dart/bin:$PATH |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 114 | |
James E. King, III | 6e883f9 | 2017-11-18 21:18:05 -0500 | [diff] [blame] | 115 | RUN apt-get install -y --no-install-recommends \ |
| 116 | `# dotnet core dependencies` \ |
| 117 | dotnet-sdk-2.0.3 |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 118 | |
| 119 | RUN apt-get install -y --no-install-recommends \ |
| 120 | `# Erlang dependencies` \ |
| 121 | erlang-base \ |
| 122 | erlang-eunit \ |
| 123 | erlang-dev \ |
| 124 | erlang-tools \ |
| 125 | rebar |
| 126 | |
| 127 | RUN apt-get install -y --no-install-recommends \ |
| 128 | `# GlibC dependencies` \ |
| 129 | libglib2.0-dev |
| 130 | |
| 131 | RUN apt-get install -y --no-install-recommends \ |
| 132 | `# golang (go) dependencies` \ |
| 133 | golang-go \ |
| 134 | golang-race-detector-runtime |
| 135 | |
| 136 | RUN apt-get install -y --no-install-recommends \ |
| 137 | `# Haskell dependencies` \ |
| 138 | ghc \ |
| 139 | cabal-install |
| 140 | |
| 141 | # see THRIFT-4352, test/haxe cores on artful |
| 142 | # RUN apt-get install -y --no-install-recommends \ |
| 143 | # `# Haxe dependencies` \ |
| 144 | # haxe \ |
| 145 | # neko \ |
| 146 | # neko-dev |
| 147 | # RUN haxelib setup --always /usr/share/haxe/lib && \ |
| 148 | # haxelib install --always hxcpp |
| 149 | |
| 150 | RUN apt-get install -y --no-install-recommends \ |
| 151 | `# Java dependencies` \ |
| 152 | ant \ |
| 153 | ant-optional \ |
| 154 | openjdk-8-jdk \ |
| 155 | maven |
| 156 | |
| 157 | RUN apt-get install -y --no-install-recommends \ |
| 158 | `# Lua dependencies` \ |
James E. King, III | 39eaae6 | 2017-11-19 20:17:33 -0500 | [diff] [blame] | 159 | lua5.2 \ |
| 160 | lua5.2-dev |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 161 | # https://bugs.launchpad.net/ubuntu/+source/lua5.3/+bug/1707212 |
| 162 | # lua5.3 does not install alternatives! |
James E. King, III | 39eaae6 | 2017-11-19 20:17:33 -0500 | [diff] [blame] | 163 | # need to update our luasocket code, lua doesn't have luaL_openlib any more |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 164 | |
| 165 | RUN apt-get install -y --no-install-recommends \ |
| 166 | `# Node.js dependencies` \ |
James E. King, III | 619218c | 2017-10-29 06:55:00 -0400 | [diff] [blame] | 167 | nodejs |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 168 | |
| 169 | RUN apt-get install -y --no-install-recommends \ |
| 170 | `# OCaml dependencies` \ |
| 171 | ocaml \ |
| 172 | opam && \ |
| 173 | opam init --yes && \ |
| 174 | opam install --yes oasis |
| 175 | |
| 176 | RUN apt-get install -y --no-install-recommends \ |
| 177 | `# Perl dependencies` \ |
| 178 | libbit-vector-perl \ |
| 179 | libclass-accessor-class-perl \ |
| 180 | libcrypt-ssleay-perl \ |
| 181 | libio-socket-ssl-perl \ |
| 182 | libnet-ssleay-perl |
| 183 | |
| 184 | RUN apt-get install -y --no-install-recommends \ |
| 185 | `# Php dependencies` \ |
| 186 | php \ |
| 187 | php-cli \ |
| 188 | php-dev \ |
| 189 | php-pear \ |
| 190 | re2c \ |
| 191 | phpunit |
| 192 | |
| 193 | RUN apt-get install -y --no-install-recommends \ |
| 194 | `# Python dependencies` \ |
| 195 | python-all \ |
| 196 | python-all-dbg \ |
| 197 | python-all-dev \ |
| 198 | python-ipaddress \ |
| 199 | python-pip \ |
| 200 | python-setuptools \ |
| 201 | python-six \ |
| 202 | python-tornado \ |
| 203 | python-twisted \ |
| 204 | python-wheel \ |
| 205 | python-zope.interface && \ |
| 206 | pip install --upgrade backports.ssl_match_hostname |
| 207 | |
| 208 | RUN apt-get install -y --no-install-recommends \ |
| 209 | `# Python3 dependencies` \ |
| 210 | python3-all \ |
| 211 | python3-all-dbg \ |
| 212 | python3-all-dev \ |
| 213 | python3-pip \ |
| 214 | python3-setuptools \ |
| 215 | python3-six \ |
| 216 | python3-tornado \ |
| 217 | python3-twisted \ |
| 218 | python3-wheel \ |
| 219 | python3-zope.interface |
| 220 | |
| 221 | RUN apt-get install -y --no-install-recommends \ |
| 222 | `# Ruby dependencies` \ |
| 223 | ruby \ |
| 224 | ruby-dev \ |
| 225 | ruby-bundler |
| 226 | RUN gem install bundler --no-ri --no-rdoc |
| 227 | |
| 228 | RUN apt-get install -y --no-install-recommends \ |
| 229 | `# Rust dependencies` \ |
| 230 | cargo \ |
| 231 | rustc |
| 232 | |
| 233 | RUN apt-get install -y --no-install-recommends \ |
| 234 | `# Static Code Analysis dependencies` \ |
| 235 | cppcheck \ |
| 236 | sloccount && \ |
| 237 | pip install flake8 |
| 238 | |
| 239 | # Clean up |
| 240 | RUN rm -rf /var/cache/apt/* && \ |
| 241 | rm -rf /var/lib/apt/lists/* && \ |
| 242 | rm -rf /tmp/* && \ |
| 243 | rm -rf /var/tmp/* |
| 244 | |
| 245 | ENV THRIFT_ROOT /thrift |
| 246 | RUN mkdir -p $THRIFT_ROOT/src |
| 247 | COPY Dockerfile $THRIFT_ROOT/ |
| 248 | WORKDIR $THRIFT_ROOT/src |