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