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 | |
Nobuaki Sukegawa | 7be78ea | 2016-05-15 00:25:04 +0900 | [diff] [blame] | 18 | FROM buildpack-deps:trusty-scm |
jfarrell | e03f7e8 | 2015-02-18 23:25:54 -0500 | [diff] [blame] | 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 | |
Nobuaki Sukegawa | 7be78ea | 2016-05-15 00:25:04 +0900 | [diff] [blame] | 23 | # Add apt sources |
| 24 | # Erlang |
| 25 | RUN echo 'deb http://packages.erlang-solutions.com/debian trusty contrib' > /etc/apt/sources.list.d/erlang_solutions.list && \ |
| 26 | curl -sSL https://packages.erlang-solutions.com/debian/erlang_solutions.asc | apt-key add - |
| 27 | # Dart |
| 28 | RUN curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \ |
| 29 | curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list && \ |
| 30 | sed -i /etc/apt/sources.list.d/dart_stable.list -e 's/https:/http:/g' |
| 31 | |
| 32 | # Consider using mirror nearby when building locally |
| 33 | # TODO: Provide option via --build-arg=... |
| 34 | # RUN sed -i /etc/apt/sources.list -e 's!http://archive.ubuntu.com/ubuntu/!http://your/mirror/!g' |
| 35 | |
Nobuaki Sukegawa | 6bb1277 | 2016-03-08 01:55:31 +0900 | [diff] [blame] | 36 | RUN apt-get update && apt-get install -y --no-install-recommends \ |
Nobuaki Sukegawa | 7be78ea | 2016-05-15 00:25:04 +0900 | [diff] [blame] | 37 | `# General dependencies` \ |
Nobuaki Sukegawa | a6ab1f5 | 2015-11-28 15:04:39 +0900 | [diff] [blame] | 38 | bison \ |
Nobuaki Sukegawa | 6bb1277 | 2016-03-08 01:55:31 +0900 | [diff] [blame] | 39 | build-essential \ |
Nobuaki Sukegawa | a6ab1f5 | 2015-11-28 15:04:39 +0900 | [diff] [blame] | 40 | clang \ |
| 41 | cmake \ |
| 42 | debhelper \ |
| 43 | flex \ |
Nobuaki Sukegawa | 6bb1277 | 2016-03-08 01:55:31 +0900 | [diff] [blame] | 44 | ninja-build \ |
Nobuaki Sukegawa | 7be78ea | 2016-05-15 00:25:04 +0900 | [diff] [blame] | 45 | pkg-config \ |
| 46 | `# Included in buildpack-deps` \ |
| 47 | `# autoconf` \ |
| 48 | `# automake` \ |
| 49 | `# g++` \ |
| 50 | `# git` \ |
| 51 | `# libtool` \ |
| 52 | `# make` |
jfarrell | e03f7e8 | 2015-02-18 23:25:54 -0500 | [diff] [blame] | 53 | |
Nobuaki Sukegawa | 6bb1277 | 2016-03-08 01:55:31 +0900 | [diff] [blame] | 54 | RUN apt-get update && apt-get install -y --no-install-recommends \ |
Nobuaki Sukegawa | 7be78ea | 2016-05-15 00:25:04 +0900 | [diff] [blame] | 55 | `# C++ dependencies` \ |
| 56 | `# libevent and OpenSSL are needed by D too` \ |
Nobuaki Sukegawa | a6ab1f5 | 2015-11-28 15:04:39 +0900 | [diff] [blame] | 57 | libboost-dev \ |
| 58 | libboost-filesystem-dev \ |
| 59 | libboost-program-options-dev \ |
| 60 | libboost-system-dev \ |
| 61 | libboost-test-dev \ |
| 62 | libboost-thread-dev \ |
| 63 | libevent-dev \ |
Nobuaki Sukegawa | 6bb1277 | 2016-03-08 01:55:31 +0900 | [diff] [blame] | 64 | libssl-dev \ |
| 65 | qt5-default \ |
| 66 | qtbase5-dev \ |
| 67 | qtbase5-dev-tools |
jfarrell | e03f7e8 | 2015-02-18 23:25:54 -0500 | [diff] [blame] | 68 | |
Nobuaki Sukegawa | 6bb1277 | 2016-03-08 01:55:31 +0900 | [diff] [blame] | 69 | RUN apt-get update && apt-get install -y --no-install-recommends \ |
Nobuaki Sukegawa | 7be78ea | 2016-05-15 00:25:04 +0900 | [diff] [blame] | 70 | `# Java dependencies` \ |
Nobuaki Sukegawa | a6ab1f5 | 2015-11-28 15:04:39 +0900 | [diff] [blame] | 71 | ant \ |
Nobuaki Sukegawa | 6bb1277 | 2016-03-08 01:55:31 +0900 | [diff] [blame] | 72 | ant-optional \ |
Nobuaki Sukegawa | a6ab1f5 | 2015-11-28 15:04:39 +0900 | [diff] [blame] | 73 | openjdk-7-jdk \ |
Nobuaki Sukegawa | 7be78ea | 2016-05-15 00:25:04 +0900 | [diff] [blame] | 74 | maven |
jfarrell | e03f7e8 | 2015-02-18 23:25:54 -0500 | [diff] [blame] | 75 | |
Nobuaki Sukegawa | ed23b2b | 2016-02-28 13:47:44 +0900 | [diff] [blame] | 76 | RUN apt-get update && apt-get install -y --no-install-recommends \ |
Nobuaki Sukegawa | 7be78ea | 2016-05-15 00:25:04 +0900 | [diff] [blame] | 77 | `# Python dependencies` \ |
| 78 | `# TODO:` \ |
| 79 | `# Install twisted and zope.interface via pip. we need twisted at ./configure time, otherwise` \ |
| 80 | `# py.twisted tests are skipped.` \ |
Nobuaki Sukegawa | a6ab1f5 | 2015-11-28 15:04:39 +0900 | [diff] [blame] | 81 | python-all \ |
Nobuaki Sukegawa | a6ab1f5 | 2015-11-28 15:04:39 +0900 | [diff] [blame] | 82 | python-all-dbg \ |
Nobuaki Sukegawa | ed23b2b | 2016-02-28 13:47:44 +0900 | [diff] [blame] | 83 | python-all-dev \ |
| 84 | python-pip \ |
Nobuaki Sukegawa | a6ab1f5 | 2015-11-28 15:04:39 +0900 | [diff] [blame] | 85 | python-setuptools \ |
Nobuaki Sukegawa | a6ab1f5 | 2015-11-28 15:04:39 +0900 | [diff] [blame] | 86 | python-twisted \ |
| 87 | python-zope.interface \ |
Nobuaki Sukegawa | f43d0ca | 2016-03-25 09:22:16 +0900 | [diff] [blame] | 88 | python3-all \ |
| 89 | python3-all-dbg \ |
| 90 | python3-all-dev \ |
| 91 | python3-setuptools \ |
Nobuaki Sukegawa | 25536ad | 2016-02-04 15:08:55 +0900 | [diff] [blame] | 92 | python3-pip |
jfarrell | e03f7e8 | 2015-02-18 23:25:54 -0500 | [diff] [blame] | 93 | |
Nobuaki Sukegawa | 6bb1277 | 2016-03-08 01:55:31 +0900 | [diff] [blame] | 94 | RUN apt-get update && apt-get install -y --no-install-recommends \ |
Nobuaki Sukegawa | 7be78ea | 2016-05-15 00:25:04 +0900 | [diff] [blame] | 95 | `# Ruby dependencies` \ |
Nobuaki Sukegawa | a6ab1f5 | 2015-11-28 15:04:39 +0900 | [diff] [blame] | 96 | ruby \ |
| 97 | ruby-dev \ |
Nobuaki Sukegawa | 7be78ea | 2016-05-15 00:25:04 +0900 | [diff] [blame] | 98 | `# Perl dependencies` \ |
Nobuaki Sukegawa | a6ab1f5 | 2015-11-28 15:04:39 +0900 | [diff] [blame] | 99 | libbit-vector-perl \ |
| 100 | libclass-accessor-class-perl \ |
| 101 | libcrypt-ssleay-perl \ |
| 102 | libio-socket-ssl-perl \ |
| 103 | libnet-ssleay-perl |
jfarrell | e03f7e8 | 2015-02-18 23:25:54 -0500 | [diff] [blame] | 104 | |
Nobuaki Sukegawa | 6bb1277 | 2016-03-08 01:55:31 +0900 | [diff] [blame] | 105 | RUN apt-get update && apt-get install -y --no-install-recommends \ |
Nobuaki Sukegawa | 7be78ea | 2016-05-15 00:25:04 +0900 | [diff] [blame] | 106 | `# Php dependencies` \ |
Nobuaki Sukegawa | a6ab1f5 | 2015-11-28 15:04:39 +0900 | [diff] [blame] | 107 | php5 \ |
| 108 | php5-dev \ |
| 109 | php5-cli \ |
| 110 | php-pear \ |
| 111 | re2c \ |
Nobuaki Sukegawa | 7be78ea | 2016-05-15 00:25:04 +0900 | [diff] [blame] | 112 | phpunit \ |
| 113 | `# GlibC dependencies` \ |
| 114 | libglib2.0-dev |
jfarrell | e03f7e8 | 2015-02-18 23:25:54 -0500 | [diff] [blame] | 115 | |
Nobuaki Sukegawa | 7be78ea | 2016-05-15 00:25:04 +0900 | [diff] [blame] | 116 | RUN apt-get update && apt-get install -y --no-install-recommends \ |
| 117 | `# Erlang dependencies` \ |
Nobuaki Sukegawa | a6ab1f5 | 2015-11-28 15:04:39 +0900 | [diff] [blame] | 118 | erlang-base \ |
| 119 | erlang-eunit \ |
| 120 | erlang-dev \ |
| 121 | erlang-tools \ |
| 122 | rebar |
jfarrell | e03f7e8 | 2015-02-18 23:25:54 -0500 | [diff] [blame] | 123 | |
Nobuaki Sukegawa | 7be78ea | 2016-05-15 00:25:04 +0900 | [diff] [blame] | 124 | RUN apt-get update && apt-get install -y --no-install-recommends \ |
| 125 | `# Haskell dependencies` \ |
| 126 | ghc \ |
| 127 | cabal-install \ |
| 128 | `# Haxe dependencies` \ |
| 129 | neko \ |
| 130 | neko-dev \ |
| 131 | libneko0 |
| 132 | |
| 133 | RUN apt-get update && apt-get install -y --no-install-recommends \ |
| 134 | `# Node.js dependencies` \ |
| 135 | nodejs \ |
| 136 | nodejs-dev \ |
Nobuaki Sukegawa | 4b7dbe3 | 2016-05-25 12:09:02 +0900 | [diff] [blame] | 137 | nodejs-legacy |
Nobuaki Sukegawa | 7be78ea | 2016-05-15 00:25:04 +0900 | [diff] [blame] | 138 | |
| 139 | RUN apt-get update && apt-get install -y --no-install-recommends \ |
| 140 | `# CSharp dependencies` \ |
| 141 | libmono-system-web2.0-cil \ |
Nobuaki Sukegawa | 080041c | 2016-09-04 18:49:19 +0900 | [diff] [blame^] | 142 | mono-devel |
Nobuaki Sukegawa | 7be78ea | 2016-05-15 00:25:04 +0900 | [diff] [blame] | 143 | |
| 144 | RUN apt-get update && apt-get install -y --no-install-recommends \ |
| 145 | `# D dependencies` \ |
| 146 | xdg-utils \ |
| 147 | `# Dart dependencies` \ |
| 148 | dart \ |
| 149 | `# Lua dependencies` \ |
| 150 | lua5.2 \ |
| 151 | lua5.2-dev \ |
| 152 | `# MinGW dependencies` \ |
| 153 | mingw32 \ |
| 154 | mingw32-binutils \ |
| 155 | mingw32-runtime \ |
| 156 | nsis \ |
| 157 | `# Clean up` \ |
| 158 | && rm -rf /var/cache/apt/* && \ |
| 159 | rm -rf /var/lib/apt/lists/* && \ |
| 160 | rm -rf /tmp/* && \ |
| 161 | rm -rf /var/tmp/* |
| 162 | |
Nobuaki Sukegawa | 7be78ea | 2016-05-15 00:25:04 +0900 | [diff] [blame] | 163 | # Ruby |
Nobuaki Sukegawa | 080041c | 2016-09-04 18:49:19 +0900 | [diff] [blame^] | 164 | RUN gem install bundler --no-ri --no-rdoc |
Nobuaki Sukegawa | 7be78ea | 2016-05-15 00:25:04 +0900 | [diff] [blame] | 165 | |
| 166 | # Go |
Nobuaki Sukegawa | a6ab1f5 | 2015-11-28 15:04:39 +0900 | [diff] [blame] | 167 | RUN curl -sSL https://storage.googleapis.com/golang/go1.4.3.linux-amd64.tar.gz | tar -C /usr/local/ -xz |
| 168 | ENV PATH /usr/local/go/bin:$PATH |
jfarrell | 763841b | 2015-06-24 09:11:54 -0400 | [diff] [blame] | 169 | |
jfarrell | e03f7e8 | 2015-02-18 23:25:54 -0500 | [diff] [blame] | 170 | # Haxe |
Nobuaki Sukegawa | 7be78ea | 2016-05-15 00:25:04 +0900 | [diff] [blame] | 171 | RUN mkdir -p /usr/lib/haxe && \ |
Nobuaki Sukegawa | 6bb1277 | 2016-03-08 01:55:31 +0900 | [diff] [blame] | 172 | curl http://haxe.org/website-content/downloads/3.2.0/downloads/haxe-3.2.0-linux64.tar.gz | \ |
| 173 | tar -C /usr/lib/haxe --strip-components=1 -xz && \ |
jfarrell | e03f7e8 | 2015-02-18 23:25:54 -0500 | [diff] [blame] | 174 | ln -s /usr/lib/haxe/haxe /usr/bin/haxe && \ |
| 175 | ln -s /usr/lib/haxe/haxelib /usr/bin/haxelib && \ |
jfarrell | e03f7e8 | 2015-02-18 23:25:54 -0500 | [diff] [blame] | 176 | mkdir -p /usr/lib/haxe/lib && \ |
| 177 | chmod -R 777 /usr/lib/haxe/lib && \ |
| 178 | haxelib setup /usr/lib/haxe/lib && \ |
Nobuaki Sukegawa | 6bb1277 | 2016-03-08 01:55:31 +0900 | [diff] [blame] | 179 | haxelib install hxcpp |
jfarrell | e03f7e8 | 2015-02-18 23:25:54 -0500 | [diff] [blame] | 180 | |
Nobuaki Sukegawa | 4b7dbe3 | 2016-05-25 12:09:02 +0900 | [diff] [blame] | 181 | # Node.js |
| 182 | RUN curl -sSL https://www.npmjs.com/install.sh | sh |
| 183 | |
Nobuaki Sukegawa | 7be78ea | 2016-05-15 00:25:04 +0900 | [diff] [blame] | 184 | # D |
| 185 | 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] | 186 | dpkg -i /tmp/dmd_2.070.0-0_amd64.deb && \ |
Nobuaki Sukegawa | eee04d9 | 2016-02-22 22:13:31 +0900 | [diff] [blame] | 187 | rm /tmp/dmd_2.070.0-0_amd64.deb && \ |
| 188 | curl -sSL https://github.com/D-Programming-Deimos/openssl/archive/master.tar.gz| tar xz && \ |
| 189 | curl -sSL https://github.com/D-Programming-Deimos/libevent/archive/master.tar.gz| tar xz && \ |
| 190 | mkdir -p /usr/include/dmd/druntime/import/deimos /usr/include/dmd/druntime/import/C && \ |
| 191 | mv libevent-master/deimos/* openssl-master/deimos/* /usr/include/dmd/druntime/import/deimos/ && \ |
| 192 | mv libevent-master/C/* openssl-master/C/* /usr/include/dmd/druntime/import/C/ && \ |
| 193 | rm -rf libevent-master openssl-master && \ |
| 194 | echo 'gcc -Wl,--no-as-needed $*' > /usr/local/bin/gcc-dmd && \ |
| 195 | chmod 755 /usr/local/bin/gcc-dmd && \ |
| 196 | echo 'CC=/usr/local/bin/gcc-dmd' >> /etc/dmd.conf |
jfarrell | e03f7e8 | 2015-02-18 23:25:54 -0500 | [diff] [blame] | 197 | |
Nobuaki Sukegawa | 7be78ea | 2016-05-15 00:25:04 +0900 | [diff] [blame] | 198 | # Dart |
Nobuaki Sukegawa | a6ab1f5 | 2015-11-28 15:04:39 +0900 | [diff] [blame] | 199 | ENV PATH /usr/lib/dart/bin:$PATH |
| 200 | |
Nobuaki Sukegawa | a6ab1f5 | 2015-11-28 15:04:39 +0900 | [diff] [blame] | 201 | ENV THRIFT_ROOT /thrift |
| 202 | RUN mkdir -p $THRIFT_ROOT/src |
| 203 | COPY scripts $THRIFT_ROOT |
| 204 | WORKDIR $THRIFT_ROOT/src |