jfarrell | e03f7e8 | 2015-02-18 23:25:54 -0500 | [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 | |
jfarrell | e03f7e8 | 2015-02-18 23:25:54 -0500 | [diff] [blame] | 13 | # |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 14 | # Apache Thrift Docker build environment for Ubuntu Trusty |
| 15 | # Using all stock Ubuntu Trusty packaging except for: |
| 16 | # - d: does not come with Ubuntu so we're installing 2.070.0 |
| 17 | # - dart: does not come with Ubuntu so we're installing 1.20.1 |
| 18 | # - dotnetcore, disabled because netcore is for 1.0.0-preview and 2.0.0 is out |
| 19 | # - haxe, disabled because the distro comes with 3.0.0 and it cores while installing |
| 20 | # - node.js, disabled because it is at 0.10.0 in the distro which is too old (need 4+) |
| 21 | # - ocaml, disabled because it fails to install properly |
| 22 | # |
jfarrell | e03f7e8 | 2015-02-18 23:25:54 -0500 | [diff] [blame] | 23 | |
Nobuaki Sukegawa | 7be78ea | 2016-05-15 00:25:04 +0900 | [diff] [blame] | 24 | FROM buildpack-deps:trusty-scm |
jfarrell | e03f7e8 | 2015-02-18 23:25:54 -0500 | [diff] [blame] | 25 | MAINTAINER Apache Thrift <dev@thrift.apache.org> |
jfarrell | e03f7e8 | 2015-02-18 23:25:54 -0500 | [diff] [blame] | 26 | ENV DEBIAN_FRONTEND noninteractive |
| 27 | |
Robert Lu | a15060a | 2017-12-28 15:29:39 +0800 | [diff] [blame^] | 28 | RUN apt-get update && \ |
| 29 | apt-get dist-upgrade -y && \ |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 30 | apt-get install -y --no-install-recommends \ |
| 31 | apt \ |
| 32 | apt-transport-https \ |
| 33 | apt-utils \ |
| 34 | curl \ |
| 35 | dirmngr \ |
| 36 | software-properties-common \ |
| 37 | wget |
Nobuaki Sukegawa | 7be78ea | 2016-05-15 00:25:04 +0900 | [diff] [blame] | 38 | |
Nobuaki Sukegawa | 6bb1277 | 2016-03-08 01:55:31 +0900 | [diff] [blame] | 39 | RUN apt-get update && apt-get install -y --no-install-recommends \ |
Nobuaki Sukegawa | 7be78ea | 2016-05-15 00:25:04 +0900 | [diff] [blame] | 40 | `# General dependencies` \ |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 41 | bash-completion \ |
Nobuaki Sukegawa | a6ab1f5 | 2015-11-28 15:04:39 +0900 | [diff] [blame] | 42 | bison \ |
Nobuaki Sukegawa | 6bb1277 | 2016-03-08 01:55:31 +0900 | [diff] [blame] | 43 | build-essential \ |
Nobuaki Sukegawa | a6ab1f5 | 2015-11-28 15:04:39 +0900 | [diff] [blame] | 44 | clang \ |
| 45 | cmake \ |
| 46 | debhelper \ |
| 47 | flex \ |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 48 | gdb \ |
| 49 | llvm \ |
Nobuaki Sukegawa | 6bb1277 | 2016-03-08 01:55:31 +0900 | [diff] [blame] | 50 | ninja-build \ |
Nobuaki Sukegawa | 7be78ea | 2016-05-15 00:25:04 +0900 | [diff] [blame] | 51 | pkg-config \ |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 52 | valgrind \ |
| 53 | vim |
| 54 | ENV PATH /usr/lib/llvm-3.8/bin:$PATH |
jfarrell | e03f7e8 | 2015-02-18 23:25:54 -0500 | [diff] [blame] | 55 | |
James E. King, III | 43e959b | 2017-04-04 13:04:29 -0400 | [diff] [blame] | 56 | RUN apt-get install -y --no-install-recommends \ |
Nobuaki Sukegawa | 7be78ea | 2016-05-15 00:25:04 +0900 | [diff] [blame] | 57 | `# C++ dependencies` \ |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 58 | libboost-all-dev \ |
Nobuaki Sukegawa | a6ab1f5 | 2015-11-28 15:04:39 +0900 | [diff] [blame] | 59 | libevent-dev \ |
Nobuaki Sukegawa | 6bb1277 | 2016-03-08 01:55:31 +0900 | [diff] [blame] | 60 | libssl-dev \ |
| 61 | qt5-default \ |
| 62 | qtbase5-dev \ |
| 63 | qtbase5-dev-tools |
jfarrell | e03f7e8 | 2015-02-18 23:25:54 -0500 | [diff] [blame] | 64 | |
James E. King, III | 43e959b | 2017-04-04 13:04:29 -0400 | [diff] [blame] | 65 | RUN apt-get install -y --no-install-recommends \ |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 66 | `# csharp (mono) dependencies` \ |
| 67 | mono-devel |
| 68 | |
| 69 | RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EBCF975E5BA24D5E && \ |
| 70 | wget http://master.dl.sourceforge.net/project/d-apt/files/d-apt.list -O /etc/apt/sources.list.d/d-apt.list && \ |
| 71 | wget -qO - https://dlang.org/d-keyring.gpg | apt-key add - && \ |
| 72 | apt-get update && \ |
| 73 | apt-get install -y --no-install-recommends \ |
| 74 | `# D dependencies` \ |
| 75 | dmd-bin=2.070.2-0 \ |
| 76 | libphobos2-dev=2.070.2-0 \ |
| 77 | dub \ |
| 78 | dfmt \ |
| 79 | dscanner \ |
| 80 | xdg-utils |
| 81 | # RUN mkdir -p /usr/include/dmd/druntime/import/deimos /usr/include/dmd/druntime/import/C && \ |
| 82 | # curl -sSL https://github.com/D-Programming-Deimos/libevent/archive/master.tar.gz| tar xz && \ |
| 83 | # mv libevent-master/deimos/* /usr/include/dmd/druntime/import/deimos/ && \ |
| 84 | # mv libevent-master/C/* /usr/include/dmd/druntime/import/C/ && \ |
| 85 | # rm -rf libevent-master |
| 86 | # RUN curl -sSL https://github.com/D-Programming-Deimos/openssl/archive/master.tar.gz| tar xz && \ |
| 87 | # mv openssl-master/deimos/* /usr/include/dmd/druntime/import/deimos/ && \ |
| 88 | # mv openssl-master/C/* /usr/include/dmd/druntime/import/C/ && \ |
| 89 | # rm -rf openssl-master |
| 90 | |
| 91 | RUN curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \ |
| 92 | curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list && \ |
| 93 | apt-get update && \ |
| 94 | apt-get install -y --no-install-recommends \ |
| 95 | `# Dart dependencies` \ |
| 96 | dart=1.20.1-1 |
| 97 | ENV PATH /usr/lib/dart/bin:$PATH |
| 98 | |
| 99 | RUN apt-get install -y --no-install-recommends \ |
| 100 | `# Erlang dependencies` \ |
| 101 | erlang-base \ |
| 102 | erlang-eunit \ |
| 103 | erlang-dev \ |
| 104 | erlang-tools \ |
| 105 | rebar |
| 106 | |
| 107 | RUN apt-get install -y --no-install-recommends \ |
| 108 | `# GlibC dependencies` \ |
| 109 | libglib2.0-dev |
| 110 | |
| 111 | RUN apt-get install -y --no-install-recommends \ |
| 112 | `# golang (go) dependencies` \ |
| 113 | golang-go |
| 114 | |
| 115 | RUN apt-get install -y --no-install-recommends \ |
| 116 | `# Haskell dependencies` \ |
| 117 | ghc \ |
| 118 | cabal-install |
| 119 | |
| 120 | # disabled because it cores while installing |
| 121 | # RUN apt-get install -y --no-install-recommends \ |
| 122 | # `# Haxe dependencies` \ |
| 123 | # haxe \ |
| 124 | # neko \ |
| 125 | # neko-dev && \ |
| 126 | # haxelib setup /usr/share/haxe/lib && \ |
| 127 | # haxelib install hxcpp 3.2.102 |
| 128 | |
| 129 | RUN apt-get install -y --no-install-recommends \ |
Nobuaki Sukegawa | 7be78ea | 2016-05-15 00:25:04 +0900 | [diff] [blame] | 130 | `# Java dependencies` \ |
Nobuaki Sukegawa | a6ab1f5 | 2015-11-28 15:04:39 +0900 | [diff] [blame] | 131 | ant \ |
Nobuaki Sukegawa | 6bb1277 | 2016-03-08 01:55:31 +0900 | [diff] [blame] | 132 | ant-optional \ |
Nobuaki Sukegawa | a6ab1f5 | 2015-11-28 15:04:39 +0900 | [diff] [blame] | 133 | openjdk-7-jdk \ |
Nobuaki Sukegawa | 7be78ea | 2016-05-15 00:25:04 +0900 | [diff] [blame] | 134 | maven |
jfarrell | e03f7e8 | 2015-02-18 23:25:54 -0500 | [diff] [blame] | 135 | |
James E. King, III | 43e959b | 2017-04-04 13:04:29 -0400 | [diff] [blame] | 136 | RUN apt-get install -y --no-install-recommends \ |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 137 | `# Lua dependencies` \ |
| 138 | lua5.1 \ |
| 139 | lua5.1-dev |
| 140 | |
| 141 | # disabled because it is too old |
| 142 | # RUN apt-get install -y --no-install-recommends \ |
| 143 | # `# Node.js dependencies` \ |
| 144 | # nodejs \ |
| 145 | # npm |
| 146 | |
| 147 | # disabled because it fails to install properly |
| 148 | # RUN apt-get install -y --no-install-recommends \ |
| 149 | # `# OCaml dependencies` \ |
| 150 | # ocaml \ |
| 151 | # opam && \ |
| 152 | # opam init --yes && \ |
| 153 | # opam install --yes oasis |
jfarrell | e03f7e8 | 2015-02-18 23:25:54 -0500 | [diff] [blame] | 154 | |
James E. King, III | 43e959b | 2017-04-04 13:04:29 -0400 | [diff] [blame] | 155 | RUN apt-get install -y --no-install-recommends \ |
Nobuaki Sukegawa | 7be78ea | 2016-05-15 00:25:04 +0900 | [diff] [blame] | 156 | `# Perl dependencies` \ |
Nobuaki Sukegawa | a6ab1f5 | 2015-11-28 15:04:39 +0900 | [diff] [blame] | 157 | libbit-vector-perl \ |
| 158 | libclass-accessor-class-perl \ |
| 159 | libcrypt-ssleay-perl \ |
| 160 | libio-socket-ssl-perl \ |
| 161 | libnet-ssleay-perl |
jfarrell | e03f7e8 | 2015-02-18 23:25:54 -0500 | [diff] [blame] | 162 | |
James E. King, III | 43e959b | 2017-04-04 13:04:29 -0400 | [diff] [blame] | 163 | RUN apt-get install -y --no-install-recommends \ |
Nobuaki Sukegawa | 7be78ea | 2016-05-15 00:25:04 +0900 | [diff] [blame] | 164 | `# Php dependencies` \ |
Nobuaki Sukegawa | a6ab1f5 | 2015-11-28 15:04:39 +0900 | [diff] [blame] | 165 | php5 \ |
Nobuaki Sukegawa | a6ab1f5 | 2015-11-28 15:04:39 +0900 | [diff] [blame] | 166 | php5-cli \ |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 167 | php5-dev \ |
Nobuaki Sukegawa | a6ab1f5 | 2015-11-28 15:04:39 +0900 | [diff] [blame] | 168 | php-pear \ |
Robert Lu | a15060a | 2017-12-28 15:29:39 +0800 | [diff] [blame^] | 169 | re2c && \ |
| 170 | wget https://getcomposer.org/installer -O - -q | php -- --quiet --install-dir=/usr/local/bin/ --filename=composer |
jfarrell | e03f7e8 | 2015-02-18 23:25:54 -0500 | [diff] [blame] | 171 | |
James E. King, III | 43e959b | 2017-04-04 13:04:29 -0400 | [diff] [blame] | 172 | RUN apt-get install -y --no-install-recommends \ |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 173 | `# Python dependencies` \ |
| 174 | python-all \ |
| 175 | python-all-dbg \ |
| 176 | python-all-dev \ |
| 177 | python-pip \ |
| 178 | python-setuptools \ |
| 179 | python-six \ |
| 180 | python-twisted \ |
| 181 | python-wheel \ |
| 182 | python-zope.interface \ |
| 183 | python3-all \ |
| 184 | python3-all-dbg \ |
| 185 | python3-all-dev \ |
| 186 | python3-pip \ |
| 187 | python3-setuptools \ |
| 188 | python3-six \ |
| 189 | python3-wheel \ |
| 190 | python3-zope.interface && \ |
| 191 | pip install -U ipaddress backports.ssl_match_hostname tornado && \ |
Robert Lu | a15060a | 2017-12-28 15:29:39 +0800 | [diff] [blame^] | 192 | pip3 install -U backports.ssl_match_hostname tornado |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 193 | # installing tornado by pip/pip3 instead of debian package |
| 194 | # if we install the debian package, the build fails in py2 |
Nobuaki Sukegawa | 7be78ea | 2016-05-15 00:25:04 +0900 | [diff] [blame] | 195 | |
James E. King, III | 43e959b | 2017-04-04 13:04:29 -0400 | [diff] [blame] | 196 | RUN apt-get install -y --no-install-recommends \ |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 197 | `# Ruby dependencies` \ |
| 198 | ruby \ |
| 199 | ruby-dev \ |
| 200 | ruby-bundler |
| 201 | RUN gem install bundler --no-ri --no-rdoc |
| 202 | |
| 203 | RUN apt-get install -y --no-install-recommends \ |
| 204 | `# Rust dependencies` \ |
| 205 | cargo \ |
| 206 | rustc |
| 207 | |
| 208 | RUN apt-get install -y --no-install-recommends \ |
| 209 | `# Static Code Analysis dependencies` \ |
| 210 | cppcheck \ |
| 211 | sloccount && \ |
| 212 | pip install flake8 |
| 213 | |
| 214 | # Clean up |
| 215 | RUN rm -rf /var/cache/apt/* && \ |
Nobuaki Sukegawa | 7be78ea | 2016-05-15 00:25:04 +0900 | [diff] [blame] | 216 | rm -rf /var/lib/apt/lists/* && \ |
| 217 | rm -rf /tmp/* && \ |
| 218 | rm -rf /var/tmp/* |
| 219 | |
Nobuaki Sukegawa | a6ab1f5 | 2015-11-28 15:04:39 +0900 | [diff] [blame] | 220 | ENV THRIFT_ROOT /thrift |
| 221 | RUN mkdir -p $THRIFT_ROOT/src |
Nobuaki Sukegawa | 93fb7ea | 2016-09-04 17:00:11 +0900 | [diff] [blame] | 222 | COPY Dockerfile $THRIFT_ROOT/ |
Nobuaki Sukegawa | a6ab1f5 | 2015-11-28 15:04:39 +0900 | [diff] [blame] | 223 | WORKDIR $THRIFT_ROOT/src |