summaryrefslogtreecommitdiff
path: root/build/docker/old/centos-7.3/Dockerfile
blob: 096bbaa45f18666fce0313cc1b6bb15928196565 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Apache Thrift Docker build environment for CentOS
#
# Known missing client libraries:
#  - dotnet (will update to 2.0.0 separately)
#  - haxe (not in centos)

FROM centos:7.3.1611
MAINTAINER Apache Thrift <dev@thrift.apache.org>

RUN yum install -y epel-release

# General dependencies
RUN yum install -y \
      autoconf \
      bison \
      bison-devel \
      clang \
      clang-analyzer \
      cmake3 \
      curl \
      flex \
      gcc \
      gcc-c++ \
      gdb \
      git \
      libtool \
      m4 \
      make \
      tar \
      unzip \
      valgrind \
      wget && \
      ln -s /usr/bin/cmake3 /usr/bin/cmake && \
      ln -s /usr/bin/cpack3 /usr/bin/cpack && \
      ln -s /usr/bin/ctest3 /usr/bin/ctest

# C++ dependencies
RUN yum install -y \
      boost-devel-static \
      zlib-devel \
      openssl-devel \
      libevent-devel && \
    cd /usr/lib64 && \
    ln -s libboost_thread-mt.a libboost_thread.a

# C# Dependencies
RUN yum install -y \
      mono-core \
      mono-devel \
      mono-web-devel \
      mono-extras

# D Dependencies
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
RUN curl -sSL https://github.com/D-Programming-Deimos/openssl/archive/master.tar.gz| tar xz && \
    curl -sSL https://github.com/D-Programming-Deimos/libevent/archive/master.tar.gz| tar xz && \
    mkdir -p /usr/include/dmd/druntime/import/deimos /usr/include/dmd/druntime/import/C && \
    mv libevent-master/deimos/* openssl-master/deimos/* /usr/include/dmd/druntime/import/deimos/ && \
    mv libevent-master/C/* openssl-master/C/* /usr/include/dmd/druntime/import/C/ && \
    rm -rf libevent-master openssl-master

# Dart
RUN cd /usr/local && \
    wget -q https://storage.googleapis.com/dart-archive/channels/stable/release/1.24.2/sdk/dartsdk-linux-x64-release.zip && \
    unzip -q dartsdk-linux-x64-release.zip && \
    rm dartsdk-linux-x64-release.zip
ENV PATH /usr/local/dart-sdk/bin:$PATH

# Erlang Dependencies
RUN curl -sSL http://packages.erlang-solutions.com/rpm/centos/erlang_solutions.repo -o /etc/yum.repos.d/erlang_solutions.repo && \
    yum install -y \
      erlang-kernel \
      erlang-erts \
      erlang-stdlib \
      erlang-eunit \
      erlang-rebar \
      erlang-tools

# GLibC Dependencies
RUN yum install -y glib2-devel

# Go Dependencies
RUN curl -sSL https://storage.googleapis.com/golang/go1.9.linux-amd64.tar.gz | tar -C /usr/local/ -xz
ENV PATH /usr/local/go/bin:$PATH

# Haskell Dependencies
RUN yum -y install haskell-platform

# Haxe Dependencies
# Not in debian/stretch

# Java Dependencies
RUN yum install -y \
      ant \
      junit \
      ant-junit \
      java-1.8.0-openjdk-devel

# Lua Dependencies
# Lua in epel is too old (5.1.4, need 5.2) so we get the latest
RUN yum install -y readline-devel && \
    wget -q http://www.lua.org/ftp/lua-5.3.4.tar.gz && \
    tar xzf lua-5.3.4.tar.gz && \
    cd lua-5.3.4 && \
    sed -i 's/CFLAGS= /CFLAGS= -fPIC /g' src/Makefile && \
    make linux && \
    make install && \
    cd .. && \
    rm -rf lua-5*

# MinGW Dependencies
RUN yum install -y \
      mingw32-binutils \
      mingw32-crt \
      mingw32-nsis

# Node.js Dependencies
# Work around epel issue where they removed http-parser that nodejs depends on!
RUN yum -y install https://opensource.enda.eu/packages/http-parser-2.7.1-3.el7.x86_64.rpm
RUN yum install -y \
      nodejs \
      npm

# Ocaml Dependencies
RUN yum install -y \
      ocaml \
      ocaml-ocamldoc && \
    wget -q https://raw.github.com/ocaml/opam/master/shell/opam_installer.sh -O - | sh -s /usr/local/bin && \
    opam init --yes && \
    opam install --yes oasis && \
    echo '. /root/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true' >> ~/.bashrc

# Perl Dependencies
RUN yum install -y \
      perl \
      perl-version \
      perl-Bit-Vector \
      perl-Class-Accessor \
      perl-ExtUtils-MakeMaker \
      perl-Test-Simple \
      perl-IO-Socket-SSL \
      perl-Net-SSLeay \
      perl-Crypt-SSLeay

# PHP Dependencies
RUN yum install -y \
      php \
      php-devel \
      php-pear \
      re2c \
      php-phpunit-PHPUnit \
      bzip2

# Python Dependencies
RUN yum install -y \
      python \
      python-devel \
      python-pip \
      python-setuptools \
      python34 \
      python34-devel \
      python34-pip \
      python34-setuptools
RUN pip2 install --upgrade pip
RUN pip2 install --upgrade backports.ssl_match_hostname ipaddress setuptools six tornado tornado-testing twisted virtualenv zope-interface
RUN pip3 install --upgrade pip
RUN pip3 install --upgrade backports.ssl_match_hostname ipaddress setuptools six tornado tornado-testing twisted virtualenv zope-interface

# Ruby Dependencies
RUN yum install -y \
      ruby \
      ruby-devel \
      rubygems && \
    gem install bundler rake

# Rust
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain 1.17.0
ENV PATH /root/.cargo/bin:$PATH

# Clean up
RUN rm -rf /tmp/* && \
    yum clean all

ENV THRIFT_ROOT /thrift
RUN mkdir -p $THRIFT_ROOT/src
COPY Dockerfile $THRIFT_ROOT/
WORKDIR $THRIFT_ROOT/src