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