Roger Meier | 447294f | 2015-12-11 00:04:41 +0100 | [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 | |
James E. King, III | 43e959b | 2017-04-04 13:04:29 -0400 | [diff] [blame] | 13 | # Apache Thrift Docker build environment for Debian |
Roger Meier | 447294f | 2015-12-11 00:04:41 +0100 | [diff] [blame] | 14 | # |
| 15 | # Known missing client libraries: |
James E. King, III | 43e959b | 2017-04-04 13:04:29 -0400 | [diff] [blame] | 16 | # - dotnetcore |
| 17 | # - rust |
Roger Meier | 447294f | 2015-12-11 00:04:41 +0100 | [diff] [blame] | 18 | |
Nobuaki Sukegawa | 7be78ea | 2016-05-15 00:25:04 +0900 | [diff] [blame] | 19 | FROM buildpack-deps:jessie-scm |
Roger Meier | 447294f | 2015-12-11 00:04:41 +0100 | [diff] [blame] | 20 | MAINTAINER Apache Thrift <dev@thrift.apache.org> |
| 21 | |
| 22 | ENV DEBIAN_FRONTEND noninteractive |
| 23 | |
Nobuaki Sukegawa | 7be78ea | 2016-05-15 00:25:04 +0900 | [diff] [blame] | 24 | # Add apt sources |
James E. King, III | 43e959b | 2017-04-04 13:04:29 -0400 | [diff] [blame] | 25 | # jessie-backports for cmake and some ruby bits |
| 26 | RUN echo "deb http://ftp.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/jessie-backports.list |
| 27 | |
Nobuaki Sukegawa | 7be78ea | 2016-05-15 00:25:04 +0900 | [diff] [blame] | 28 | # Dart |
| 29 | RUN curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \ |
| 30 | curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list && \ |
| 31 | sed -i /etc/apt/sources.list.d/dart_stable.list -e 's/https:/http:/g' |
| 32 | |
Nobuaki Sukegawa | 6bb1277 | 2016-03-08 01:55:31 +0900 | [diff] [blame] | 33 | RUN apt-get update && apt-get install -y --no-install-recommends \ |
Nobuaki Sukegawa | 7be78ea | 2016-05-15 00:25:04 +0900 | [diff] [blame] | 34 | `# General dependencies` \ |
Roger Meier | 447294f | 2015-12-11 00:04:41 +0100 | [diff] [blame] | 35 | bison \ |
Nobuaki Sukegawa | 6bb1277 | 2016-03-08 01:55:31 +0900 | [diff] [blame] | 36 | build-essential \ |
Roger Meier | 447294f | 2015-12-11 00:04:41 +0100 | [diff] [blame] | 37 | clang \ |
Roger Meier | 447294f | 2015-12-11 00:04:41 +0100 | [diff] [blame] | 38 | debhelper \ |
| 39 | flex \ |
James E. King, III | 43e959b | 2017-04-04 13:04:29 -0400 | [diff] [blame] | 40 | pkg-config && \ |
| 41 | apt-get -t jessie-backports install -y --no-install-recommends cmake |
Roger Meier | 447294f | 2015-12-11 00:04:41 +0100 | [diff] [blame] | 42 | |
James E. King, III | 43e959b | 2017-04-04 13:04:29 -0400 | [diff] [blame] | 43 | RUN apt-get install -y --no-install-recommends \ |
Nobuaki Sukegawa | 7be78ea | 2016-05-15 00:25:04 +0900 | [diff] [blame] | 44 | `# C++ dependencies` \ |
Roger Meier | 447294f | 2015-12-11 00:04:41 +0100 | [diff] [blame] | 45 | libboost-dev \ |
| 46 | libboost-filesystem-dev \ |
| 47 | libboost-program-options-dev \ |
| 48 | libboost-system-dev \ |
| 49 | libboost-test-dev \ |
| 50 | libboost-thread-dev \ |
| 51 | libevent-dev \ |
Nobuaki Sukegawa | 6bb1277 | 2016-03-08 01:55:31 +0900 | [diff] [blame] | 52 | libssl-dev \ |
| 53 | qt5-default \ |
| 54 | qtbase5-dev \ |
| 55 | qtbase5-dev-tools |
Roger Meier | 447294f | 2015-12-11 00:04:41 +0100 | [diff] [blame] | 56 | |
James E. King, III | 43e959b | 2017-04-04 13:04:29 -0400 | [diff] [blame] | 57 | RUN apt-get install -y --no-install-recommends \ |
Nobuaki Sukegawa | 7be78ea | 2016-05-15 00:25:04 +0900 | [diff] [blame] | 58 | `# Java dependencies` \ |
Roger Meier | 447294f | 2015-12-11 00:04:41 +0100 | [diff] [blame] | 59 | ant \ |
Nobuaki Sukegawa | 6bb1277 | 2016-03-08 01:55:31 +0900 | [diff] [blame] | 60 | ant-optional \ |
Roger Meier | 447294f | 2015-12-11 00:04:41 +0100 | [diff] [blame] | 61 | openjdk-7-jdk \ |
Nobuaki Sukegawa | 7be78ea | 2016-05-15 00:25:04 +0900 | [diff] [blame] | 62 | maven |
Roger Meier | 447294f | 2015-12-11 00:04:41 +0100 | [diff] [blame] | 63 | |
James E. King, III | 43e959b | 2017-04-04 13:04:29 -0400 | [diff] [blame] | 64 | RUN apt-get install -y --no-install-recommends \ |
Nobuaki Sukegawa | 7be78ea | 2016-05-15 00:25:04 +0900 | [diff] [blame] | 65 | `# Python dependencies` \ |
Roger Meier | 447294f | 2015-12-11 00:04:41 +0100 | [diff] [blame] | 66 | python-all \ |
Roger Meier | 447294f | 2015-12-11 00:04:41 +0100 | [diff] [blame] | 67 | python-all-dbg \ |
Nobuaki Sukegawa | 7be78ea | 2016-05-15 00:25:04 +0900 | [diff] [blame] | 68 | python-all-dev \ |
| 69 | python-pip \ |
Roger Meier | 447294f | 2015-12-11 00:04:41 +0100 | [diff] [blame] | 70 | python-setuptools \ |
Roger Meier | 447294f | 2015-12-11 00:04:41 +0100 | [diff] [blame] | 71 | python-twisted \ |
| 72 | python-zope.interface \ |
Nobuaki Sukegawa | f43d0ca | 2016-03-25 09:22:16 +0900 | [diff] [blame] | 73 | python3-all \ |
| 74 | python3-all-dbg \ |
| 75 | python3-all-dev \ |
| 76 | python3-setuptools \ |
Nobuaki Sukegawa | 25536ad | 2016-02-04 15:08:55 +0900 | [diff] [blame] | 77 | python3-pip |
Roger Meier | 447294f | 2015-12-11 00:04:41 +0100 | [diff] [blame] | 78 | |
James E. King, III | 43e959b | 2017-04-04 13:04:29 -0400 | [diff] [blame] | 79 | RUN apt-get install -y --no-install-recommends \ |
Nobuaki Sukegawa | 7be78ea | 2016-05-15 00:25:04 +0900 | [diff] [blame] | 80 | `# Ruby dependencies` \ |
Roger Meier | 447294f | 2015-12-11 00:04:41 +0100 | [diff] [blame] | 81 | ruby \ |
jfarrell | b2a4d4a | 2016-04-04 14:25:03 -0400 | [diff] [blame] | 82 | ruby-bundler \ |
Roger Meier | 447294f | 2015-12-11 00:04:41 +0100 | [diff] [blame] | 83 | ruby-dev \ |
Nobuaki Sukegawa | 7be78ea | 2016-05-15 00:25:04 +0900 | [diff] [blame] | 84 | `# Perl dependencies` \ |
Roger Meier | 447294f | 2015-12-11 00:04:41 +0100 | [diff] [blame] | 85 | libbit-vector-perl \ |
| 86 | libclass-accessor-class-perl \ |
| 87 | libcrypt-ssleay-perl \ |
| 88 | libio-socket-ssl-perl \ |
| 89 | libnet-ssleay-perl |
| 90 | |
James E. King, III | 43e959b | 2017-04-04 13:04:29 -0400 | [diff] [blame] | 91 | RUN apt-get -t jessie-backports install -y ruby-bundler |
| 92 | RUN apt-get install -y --no-install-recommends \ |
Nobuaki Sukegawa | 7be78ea | 2016-05-15 00:25:04 +0900 | [diff] [blame] | 93 | `# Php dependencies` \ |
Roger Meier | 447294f | 2015-12-11 00:04:41 +0100 | [diff] [blame] | 94 | php5 \ |
| 95 | php5-dev \ |
| 96 | php5-cli \ |
| 97 | php-pear \ |
| 98 | re2c \ |
Nobuaki Sukegawa | 7be78ea | 2016-05-15 00:25:04 +0900 | [diff] [blame] | 99 | phpunit \ |
| 100 | `# GlibC dependencies` \ |
| 101 | libglib2.0-dev |
Roger Meier | 447294f | 2015-12-11 00:04:41 +0100 | [diff] [blame] | 102 | |
Nobuaki Sukegawa | 6bb1277 | 2016-03-08 01:55:31 +0900 | [diff] [blame] | 103 | RUN apt-get update && apt-get install -y --no-install-recommends \ |
Nobuaki Sukegawa | 7be78ea | 2016-05-15 00:25:04 +0900 | [diff] [blame] | 104 | `# Erlang dependencies` \ |
Roger Meier | 447294f | 2015-12-11 00:04:41 +0100 | [diff] [blame] | 105 | erlang-base \ |
| 106 | erlang-eunit \ |
| 107 | erlang-dev \ |
| 108 | erlang-tools \ |
| 109 | rebar |
| 110 | |
Nobuaki Sukegawa | 7be78ea | 2016-05-15 00:25:04 +0900 | [diff] [blame] | 111 | RUN apt-get update && apt-get install -y --no-install-recommends \ |
Nobuaki Sukegawa | 7be78ea | 2016-05-15 00:25:04 +0900 | [diff] [blame] | 112 | `# Haxe dependencies` \ |
| 113 | neko \ |
| 114 | neko-dev \ |
| 115 | libneko0 |
| 116 | |
| 117 | RUN apt-get update && apt-get install -y --no-install-recommends \ |
| 118 | `# Node.js dependencies` \ |
| 119 | nodejs \ |
| 120 | nodejs-dev \ |
| 121 | nodejs-legacy \ |
| 122 | npm |
| 123 | |
| 124 | RUN apt-get update && apt-get install -y --no-install-recommends \ |
Nobuaki Sukegawa | 7be78ea | 2016-05-15 00:25:04 +0900 | [diff] [blame] | 125 | `# D dependencies` \ |
| 126 | xdg-utils \ |
| 127 | `# Dart dependencies` \ |
| 128 | dart \ |
| 129 | `# Lua dependencies` \ |
| 130 | lua5.2 \ |
| 131 | lua5.2-dev \ |
| 132 | `# MinGW dependencies` \ |
| 133 | mingw32 \ |
| 134 | mingw32-binutils \ |
| 135 | `# mingw32-runtime` \ |
| 136 | nsis \ |
| 137 | `# Clean up` \ |
| 138 | && rm -rf /var/cache/apt/* && \ |
| 139 | rm -rf /var/lib/apt/lists/* && \ |
| 140 | rm -rf /tmp/* && \ |
| 141 | rm -rf /var/tmp/* |
| 142 | |
Nobuaki Sukegawa | 7be78ea | 2016-05-15 00:25:04 +0900 | [diff] [blame] | 143 | # Ruby |
Nobuaki Sukegawa | 080041c | 2016-09-04 18:49:19 +0900 | [diff] [blame] | 144 | RUN gem install bundler --no-ri --no-rdoc |
Nobuaki Sukegawa | 7be78ea | 2016-05-15 00:25:04 +0900 | [diff] [blame] | 145 | |
Nobuaki Sukegawa | bf9fa90 | 2016-09-04 18:49:21 +0900 | [diff] [blame] | 146 | # Python optional dependencies |
| 147 | RUN pip2 install -U ipaddress backports.ssl_match_hostname tornado |
| 148 | RUN pip3 install -U backports.ssl_match_hostname tornado |
| 149 | |
Nobuaki Sukegawa | 7be78ea | 2016-05-15 00:25:04 +0900 | [diff] [blame] | 150 | # Go |
taozle | c0d384a | 2017-07-17 18:40:42 +0200 | [diff] [blame] | 151 | RUN curl -sSL https://storage.googleapis.com/golang/go1.4.3.linux-amd64.tar.gz | tar -C /usr/local/ -xz |
Roger Meier | 447294f | 2015-12-11 00:04:41 +0100 | [diff] [blame] | 152 | ENV PATH /usr/local/go/bin:$PATH |
| 153 | |
Roger Meier | 447294f | 2015-12-11 00:04:41 +0100 | [diff] [blame] | 154 | # Haxe |
Nobuaki Sukegawa | 7be78ea | 2016-05-15 00:25:04 +0900 | [diff] [blame] | 155 | RUN mkdir -p /usr/lib/haxe && \ |
James E. King, III | 9a8d576 | 2017-03-27 15:39:00 -0400 | [diff] [blame] | 156 | wget -O - https://github.com/HaxeFoundation/haxe/releases/download/3.2.1/haxe-3.2.1-linux64.tar.gz | \ |
Nobuaki Sukegawa | 6bb1277 | 2016-03-08 01:55:31 +0900 | [diff] [blame] | 157 | tar -C /usr/lib/haxe --strip-components=1 -xz && \ |
Roger Meier | 447294f | 2015-12-11 00:04:41 +0100 | [diff] [blame] | 158 | ln -s /usr/lib/haxe/haxe /usr/bin/haxe && \ |
| 159 | ln -s /usr/lib/haxe/haxelib /usr/bin/haxelib && \ |
| 160 | mkdir -p /usr/lib/haxe/lib && \ |
| 161 | chmod -R 777 /usr/lib/haxe/lib && \ |
| 162 | haxelib setup /usr/lib/haxe/lib && \ |
Nobuaki Sukegawa | 6bb1277 | 2016-03-08 01:55:31 +0900 | [diff] [blame] | 163 | haxelib install hxcpp |
Roger Meier | 447294f | 2015-12-11 00:04:41 +0100 | [diff] [blame] | 164 | |
Nobuaki Sukegawa | 7be78ea | 2016-05-15 00:25:04 +0900 | [diff] [blame] | 165 | # D |
| 166 | RUN curl -sSL http://downloads.dlang.org/releases/2.x/2.070.0/dmd_2.070.0-0_amd64.deb -o /tmp/dmd_2.070.0-0_amd64.deb && \ |
Nobuaki Sukegawa | 33de26c | 2016-02-22 01:43:23 +0900 | [diff] [blame] | 167 | dpkg -i /tmp/dmd_2.070.0-0_amd64.deb && \ |
Nobuaki Sukegawa | eee04d9 | 2016-02-22 22:13:31 +0900 | [diff] [blame] | 168 | rm /tmp/dmd_2.070.0-0_amd64.deb && \ |
| 169 | curl -sSL https://github.com/D-Programming-Deimos/openssl/archive/master.tar.gz| tar xz && \ |
| 170 | curl -sSL https://github.com/D-Programming-Deimos/libevent/archive/master.tar.gz| tar xz && \ |
| 171 | mkdir -p /usr/include/dmd/druntime/import/deimos /usr/include/dmd/druntime/import/C && \ |
| 172 | mv libevent-master/deimos/* openssl-master/deimos/* /usr/include/dmd/druntime/import/deimos/ && \ |
| 173 | mv libevent-master/C/* openssl-master/C/* /usr/include/dmd/druntime/import/C/ && \ |
| 174 | rm -rf libevent-master openssl-master && \ |
| 175 | echo 'gcc -Wl,--no-as-needed $*' > /usr/local/bin/gcc-dmd && \ |
| 176 | chmod 755 /usr/local/bin/gcc-dmd && \ |
| 177 | echo 'CC=/usr/local/bin/gcc-dmd' >> /etc/dmd.conf |
Roger Meier | 447294f | 2015-12-11 00:04:41 +0100 | [diff] [blame] | 178 | |
Nobuaki Sukegawa | 7be78ea | 2016-05-15 00:25:04 +0900 | [diff] [blame] | 179 | # Dart |
Roger Meier | 447294f | 2015-12-11 00:04:41 +0100 | [diff] [blame] | 180 | ENV PATH /usr/lib/dart/bin:$PATH |
| 181 | |
James E. King, III | ec50ae0 | 2017-02-14 16:12:11 -0500 | [diff] [blame] | 182 | # OCaml |
| 183 | RUN echo 'deb http://ppa.launchpad.net/avsm/ppa/ubuntu trusty main' > /etc/apt/sources.list.d/avsm-official-ocaml.list && \ |
| 184 | gpg --keyserver keyserver.ubuntu.com --recv 61707B09 && \ |
| 185 | gpg --export --armor 61707B09 | apt-key add - && \ |
| 186 | apt-get update && \ |
| 187 | apt-get install -y ocaml opam && \ |
| 188 | opam init && \ |
| 189 | opam install oasis |
| 190 | |
Nobuaki Sukegawa | dd2223c | 2016-02-22 21:02:37 +0900 | [diff] [blame] | 191 | # Force utf8 locale to successfully build Haskell tf-random |
| 192 | ENV LC_ALL C.UTF-8 |
| 193 | |
Roger Meier | 447294f | 2015-12-11 00:04:41 +0100 | [diff] [blame] | 194 | ENV THRIFT_ROOT /thrift |
| 195 | RUN mkdir -p $THRIFT_ROOT/src |
Nobuaki Sukegawa | 93fb7ea | 2016-09-04 17:00:11 +0900 | [diff] [blame] | 196 | COPY Dockerfile $THRIFT_ROOT/ |
Roger Meier | 447294f | 2015-12-11 00:04:41 +0100 | [diff] [blame] | 197 | WORKDIR $THRIFT_ROOT/src |