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
5 # http://www.apache.org/licenses/LICENSE-2.0
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.
13 # Apache Thrift Docker build environment for CentOS
15 # Known missing client libraries:
16 # - dotnet (will update to 2.0.0 separately)
17 # - haxe (not in centos)
20 MAINTAINER Apache Thrift <dev@thrift.apache.org>
22 RUN yum install -y epel-release
24 # General dependencies
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
56 ln -s libboost_thread-mt.a libboost_thread.a
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
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
82 RUN curl -sSL http://packages.erlang-solutions.com/rpm/centos/erlang_solutions.repo -o /etc/yum.repos.d/erlang_solutions.repo && \
92 RUN yum install -y glib2-devel
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
98 # Haskell Dependencies
99 RUN yum -y install haskell-platform
102 # Not in debian/stretch
109 java-1.8.0-openjdk-devel
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 && \
117 sed -i 's/CFLAGS= /CFLAGS= -fPIC /g' src/Makefile && \
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
140 wget -q https://raw.github.com/ocaml/opam/master/shell/opam_installer.sh -O - | sh -s /usr/local/bin && \
142 opam install --yes oasis && \
143 echo '. /root/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true' >> ~/.bashrc
150 perl-Class-Accessor \
151 perl-ExtUtils-MakeMaker \
163 php-phpunit-PHPUnit \
166 # Python Dependencies
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
186 gem install bundler rake
189 RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain 1.17.0
190 ENV PATH /root/.cargo/bin:$PATH
193 RUN rm -rf /tmp/* && \
196 ENV THRIFT_ROOT /thrift
197 RUN mkdir -p $THRIFT_ROOT/src
198 COPY Dockerfile $THRIFT_ROOT/
199 WORKDIR $THRIFT_ROOT/src