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