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 | |
Nobuaki Sukegawa | 6bb1277 | 2016-03-08 01:55:31 +0900 | [diff] [blame] | 86 | RUN apt-get update && apt-get install -y --no-install-recommends \ |
Nobuaki Sukegawa | 7be78ea | 2016-05-15 00:25:04 +0900 | [diff] [blame^] | 87 | `# Php dependencies` \ |
Roger Meier | 447294f | 2015-12-11 00:04:41 +0100 | [diff] [blame] | 88 | php5 \ |
| 89 | php5-dev \ |
| 90 | php5-cli \ |
| 91 | php-pear \ |
| 92 | re2c \ |
Nobuaki Sukegawa | 7be78ea | 2016-05-15 00:25:04 +0900 | [diff] [blame^] | 93 | phpunit \ |
| 94 | `# GlibC dependencies` \ |
| 95 | libglib2.0-dev |
Roger Meier | 447294f | 2015-12-11 00:04:41 +0100 | [diff] [blame] | 96 | |
Nobuaki Sukegawa | 6bb1277 | 2016-03-08 01:55:31 +0900 | [diff] [blame] | 97 | RUN apt-get update && apt-get install -y --no-install-recommends \ |
Nobuaki Sukegawa | 7be78ea | 2016-05-15 00:25:04 +0900 | [diff] [blame^] | 98 | `# Erlang dependencies` \ |
Roger Meier | 447294f | 2015-12-11 00:04:41 +0100 | [diff] [blame] | 99 | erlang-base \ |
| 100 | erlang-eunit \ |
| 101 | erlang-dev \ |
| 102 | erlang-tools \ |
| 103 | rebar |
| 104 | |
Nobuaki Sukegawa | 7be78ea | 2016-05-15 00:25:04 +0900 | [diff] [blame^] | 105 | RUN apt-get update && apt-get install -y --no-install-recommends \ |
| 106 | `# Haskell dependencies` \ |
| 107 | ghc \ |
| 108 | cabal-install \ |
| 109 | `# Haxe dependencies` \ |
| 110 | neko \ |
| 111 | neko-dev \ |
| 112 | libneko0 |
| 113 | |
| 114 | RUN apt-get update && apt-get install -y --no-install-recommends \ |
| 115 | `# Node.js dependencies` \ |
| 116 | nodejs \ |
| 117 | nodejs-dev \ |
| 118 | nodejs-legacy \ |
| 119 | npm |
| 120 | |
| 121 | RUN apt-get update && apt-get install -y --no-install-recommends \ |
| 122 | `# CSharp dependencies` \ |
| 123 | libmono-system-web2.0-cil \ |
| 124 | mono-complete \ |
| 125 | mono-devel \ |
| 126 | mono-gmcs \ |
| 127 | mono-xbuild |
| 128 | |
| 129 | RUN apt-get update && apt-get install -y --no-install-recommends \ |
| 130 | `# D dependencies` \ |
| 131 | xdg-utils \ |
| 132 | `# Dart dependencies` \ |
| 133 | dart \ |
| 134 | `# Lua dependencies` \ |
| 135 | lua5.2 \ |
| 136 | lua5.2-dev \ |
| 137 | `# MinGW dependencies` \ |
| 138 | mingw32 \ |
| 139 | mingw32-binutils \ |
| 140 | `# mingw32-runtime` \ |
| 141 | nsis \ |
| 142 | `# Clean up` \ |
| 143 | && rm -rf /var/cache/apt/* && \ |
| 144 | rm -rf /var/lib/apt/lists/* && \ |
| 145 | rm -rf /tmp/* && \ |
| 146 | rm -rf /var/tmp/* |
| 147 | |
| 148 | # Java |
| 149 | RUN update-java-alternatives -s java-1.7.0-openjdk-amd64 |
| 150 | |
| 151 | # Ruby |
| 152 | RUN gem install bundler rake |
| 153 | |
| 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 | |
Nobuaki Sukegawa | dd2223c | 2016-02-22 21:02:37 +0900 | [diff] [blame] | 186 | # Force utf8 locale to successfully build Haskell tf-random |
| 187 | ENV LC_ALL C.UTF-8 |
| 188 | |
Roger Meier | 447294f | 2015-12-11 00:04:41 +0100 | [diff] [blame] | 189 | ENV THRIFT_ROOT /thrift |
| 190 | RUN mkdir -p $THRIFT_ROOT/src |
| 191 | COPY scripts $THRIFT_ROOT |
| 192 | WORKDIR $THRIFT_ROOT/src |