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