]>
Commit | Line | Data |
---|---|---|
f67539c2 TL |
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 | # - dotnet (will update to 2.0.0 separately) | |
17 | # - haxe (not in centos) | |
18 | ||
19 | FROM centos:7.3.1611 | |
20 | MAINTAINER Apache Thrift <dev@thrift.apache.org> | |
21 | ||
22 | RUN yum install -y epel-release | |
23 | ||
24 | # General dependencies | |
25 | RUN yum install -y \ | |
26 | autoconf \ | |
27 | bison \ | |
28 | bison-devel \ | |
29 | clang \ | |
30 | clang-analyzer \ | |
31 | cmake3 \ | |
32 | curl \ | |
33 | flex \ | |
34 | gcc \ | |
35 | gcc-c++ \ | |
36 | gdb \ | |
37 | git \ | |
38 | libtool \ | |
39 | m4 \ | |
40 | make \ | |
41 | tar \ | |
42 | unzip \ | |
43 | valgrind \ | |
44 | wget && \ | |
45 | ln -s /usr/bin/cmake3 /usr/bin/cmake && \ | |
46 | ln -s /usr/bin/cpack3 /usr/bin/cpack && \ | |
47 | ln -s /usr/bin/ctest3 /usr/bin/ctest | |
48 | ||
49 | # C++ dependencies | |
50 | RUN yum install -y \ | |
51 | boost-devel-static \ | |
52 | zlib-devel \ | |
53 | openssl-devel \ | |
54 | libevent-devel && \ | |
55 | cd /usr/lib64 && \ | |
56 | ln -s libboost_thread-mt.a libboost_thread.a | |
57 | ||
58 | # C# Dependencies | |
59 | RUN yum install -y \ | |
60 | mono-core \ | |
61 | mono-devel \ | |
62 | mono-web-devel \ | |
63 | mono-extras | |
64 | ||
65 | # D Dependencies | |
66 | RUN yum install -y http://downloads.dlang.org/releases/2.x/2.076.0/dmd-2.076.0-0.fedora.x86_64.rpm xdg-utils | |
67 | RUN curl -sSL https://github.com/D-Programming-Deimos/openssl/archive/master.tar.gz| tar xz && \ | |
68 | curl -sSL https://github.com/D-Programming-Deimos/libevent/archive/master.tar.gz| tar xz && \ | |
69 | mkdir -p /usr/include/dmd/druntime/import/deimos /usr/include/dmd/druntime/import/C && \ | |
70 | mv libevent-master/deimos/* openssl-master/deimos/* /usr/include/dmd/druntime/import/deimos/ && \ | |
71 | mv libevent-master/C/* openssl-master/C/* /usr/include/dmd/druntime/import/C/ && \ | |
72 | rm -rf libevent-master openssl-master | |
73 | ||
74 | # Dart | |
75 | RUN cd /usr/local && \ | |
76 | wget -q https://storage.googleapis.com/dart-archive/channels/stable/release/1.24.2/sdk/dartsdk-linux-x64-release.zip && \ | |
77 | unzip -q dartsdk-linux-x64-release.zip && \ | |
78 | rm dartsdk-linux-x64-release.zip | |
79 | ENV PATH /usr/local/dart-sdk/bin:$PATH | |
80 | ||
81 | # Erlang Dependencies | |
82 | RUN curl -sSL http://packages.erlang-solutions.com/rpm/centos/erlang_solutions.repo -o /etc/yum.repos.d/erlang_solutions.repo && \ | |
83 | yum install -y \ | |
84 | erlang-kernel \ | |
85 | erlang-erts \ | |
86 | erlang-stdlib \ | |
87 | erlang-eunit \ | |
88 | erlang-rebar \ | |
89 | erlang-tools | |
90 | ||
91 | # GLibC Dependencies | |
92 | RUN yum install -y glib2-devel | |
93 | ||
94 | # Go Dependencies | |
95 | RUN curl -sSL https://storage.googleapis.com/golang/go1.9.linux-amd64.tar.gz | tar -C /usr/local/ -xz | |
96 | ENV PATH /usr/local/go/bin:$PATH | |
97 | ||
98 | # Haskell Dependencies | |
99 | RUN yum -y install haskell-platform | |
100 | ||
101 | # Haxe Dependencies | |
102 | # Not in debian/stretch | |
103 | ||
104 | # Java Dependencies | |
105 | RUN yum install -y \ | |
106 | ant \ | |
107 | junit \ | |
108 | ant-junit \ | |
109 | java-1.8.0-openjdk-devel | |
110 | ||
111 | # Lua Dependencies | |
112 | # Lua in epel is too old (5.1.4, need 5.2) so we get the latest | |
113 | RUN yum install -y readline-devel && \ | |
114 | wget -q http://www.lua.org/ftp/lua-5.3.4.tar.gz && \ | |
115 | tar xzf lua-5.3.4.tar.gz && \ | |
116 | cd lua-5.3.4 && \ | |
117 | sed -i 's/CFLAGS= /CFLAGS= -fPIC /g' src/Makefile && \ | |
118 | make linux && \ | |
119 | make install && \ | |
120 | cd .. && \ | |
121 | rm -rf lua-5* | |
122 | ||
123 | # MinGW Dependencies | |
124 | RUN yum install -y \ | |
125 | mingw32-binutils \ | |
126 | mingw32-crt \ | |
127 | mingw32-nsis | |
128 | ||
129 | # Node.js Dependencies | |
130 | # Work around epel issue where they removed http-parser that nodejs depends on! | |
131 | RUN yum -y install https://opensource.enda.eu/packages/http-parser-2.7.1-3.el7.x86_64.rpm | |
132 | RUN yum install -y \ | |
133 | nodejs \ | |
134 | npm | |
135 | ||
136 | # Ocaml Dependencies | |
137 | RUN yum install -y \ | |
138 | ocaml \ | |
139 | ocaml-ocamldoc && \ | |
140 | wget -q https://raw.github.com/ocaml/opam/master/shell/opam_installer.sh -O - | sh -s /usr/local/bin && \ | |
141 | opam init --yes && \ | |
142 | opam install --yes oasis && \ | |
143 | echo '. /root/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true' >> ~/.bashrc | |
144 | ||
145 | # Perl Dependencies | |
146 | RUN yum install -y \ | |
147 | perl \ | |
148 | perl-version \ | |
149 | perl-Bit-Vector \ | |
150 | perl-Class-Accessor \ | |
151 | perl-ExtUtils-MakeMaker \ | |
152 | perl-Test-Simple \ | |
153 | perl-IO-Socket-SSL \ | |
154 | perl-Net-SSLeay \ | |
155 | perl-Crypt-SSLeay | |
156 | ||
157 | # PHP Dependencies | |
158 | RUN yum install -y \ | |
159 | php \ | |
160 | php-devel \ | |
161 | php-pear \ | |
162 | re2c \ | |
163 | php-phpunit-PHPUnit \ | |
164 | bzip2 | |
165 | ||
166 | # Python Dependencies | |
167 | RUN yum install -y \ | |
168 | python \ | |
169 | python-devel \ | |
170 | python-pip \ | |
171 | python-setuptools \ | |
172 | python34 \ | |
173 | python34-devel \ | |
174 | python34-pip \ | |
175 | python34-setuptools | |
176 | RUN pip2 install --upgrade pip | |
177 | RUN pip2 install --upgrade backports.ssl_match_hostname ipaddress setuptools six tornado tornado-testing twisted virtualenv zope-interface | |
178 | RUN pip3 install --upgrade pip | |
179 | RUN pip3 install --upgrade backports.ssl_match_hostname ipaddress setuptools six tornado tornado-testing twisted virtualenv zope-interface | |
180 | ||
181 | # Ruby Dependencies | |
182 | RUN yum install -y \ | |
183 | ruby \ | |
184 | ruby-devel \ | |
185 | rubygems && \ | |
186 | gem install bundler rake | |
187 | ||
188 | # Rust | |
189 | RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain 1.17.0 | |
190 | ENV PATH /root/.cargo/bin:$PATH | |
191 | ||
192 | # Clean up | |
193 | RUN rm -rf /tmp/* && \ | |
194 | yum clean all | |
195 | ||
196 | ENV THRIFT_ROOT /thrift | |
197 | RUN mkdir -p $THRIFT_ROOT/src | |
198 | COPY Dockerfile $THRIFT_ROOT/ | |
199 | WORKDIR $THRIFT_ROOT/src |