2019-02-24 12:20:44 +00:00
|
|
|
FROM centos:6 as builder
|
|
|
|
|
|
|
|
# https://www.softwarecollections.org/en/scls/rhscl/devtoolset-7/
|
|
|
|
RUN yum -y install centos-release-scl yum-utils \
|
|
|
|
&& yum-config-manager --enable rhel-server-rhscl-7-rpms \
|
|
|
|
&& yum install -y devtoolset-7-gcc devtoolset-7-gcc-c++
|
|
|
|
|
2019-03-01 18:29:38 +00:00
|
|
|
RUN set -xe \
|
|
|
|
&& yum install -y \
|
2020-07-25 10:46:31 +00:00
|
|
|
make patch \
|
2019-02-24 12:20:44 +00:00
|
|
|
git wget \
|
|
|
|
zlib-devel openssl-devel gperf \
|
|
|
|
pkgconfig ccache gperf unzip \
|
2019-03-01 18:29:38 +00:00
|
|
|
libpng-devel libjpeg-devel \
|
2019-02-24 12:20:44 +00:00
|
|
|
epel-release \
|
2019-03-01 18:29:38 +00:00
|
|
|
&& yum install -y opus-devel patchelf
|
2019-02-24 12:20:44 +00:00
|
|
|
|
2020-07-25 10:46:31 +00:00
|
|
|
RUN wget https://cmake.org/files/v3.18/cmake-3.18.0-Linux-x86_64.sh \
|
|
|
|
&& sh cmake-3.18.0-Linux-x86_64.sh --prefix=/usr --exclude-subdir
|
|
|
|
|
|
|
|
COPY glibc_gcc.patch /
|
|
|
|
|
|
|
|
RUN source /opt/rh/devtoolset-7/enable \
|
|
|
|
&& wget http://ftp.gnu.org/gnu/glibc/glibc-2.14.tar.gz \
|
|
|
|
&& tar zxf glibc-2.14.tar.gz \
|
|
|
|
&& rm glibc-2.14.tar.gz \
|
|
|
|
&& cd glibc-2.14 \
|
|
|
|
&& patch < /glibc_gcc.patch \
|
|
|
|
&& gcc --version \
|
|
|
|
&& mkdir build \
|
|
|
|
&& cd build \
|
|
|
|
&& ../configure --prefix=/opt/glibc-2.14 \
|
|
|
|
&& make -j $(grep -c ^processor /proc/cpuinfo) \
|
|
|
|
&& make install \
|
|
|
|
&& cd / \
|
|
|
|
&& rm -rf glibc-2.14 \
|
|
|
|
|
|
|
|
ENV LD_LIBRARY_PATH="/opt/glibc-2.14/lib:${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
|
2019-02-24 12:20:44 +00:00
|
|
|
|
|
|
|
COPY tdlib_header.patch /
|
|
|
|
COPY tdlib_threadname.patch /
|
|
|
|
|
|
|
|
RUN source /opt/rh/devtoolset-7/enable \
|
|
|
|
&& git clone https://github.com/tdlib/td.git \
|
|
|
|
&& cd td \
|
2020-07-25 10:46:31 +00:00
|
|
|
&& git reset --hard v1.6.0 \
|
2019-02-24 12:20:44 +00:00
|
|
|
&& git apply /tdlib_header.patch \
|
|
|
|
&& git apply /tdlib_threadname.patch \
|
|
|
|
&& mkdir build \
|
|
|
|
&& cd build \
|
2020-07-25 10:46:31 +00:00
|
|
|
&& export CPLUS_INCLUDE_PATH="/opt/glibc-2.14/include" \
|
2019-02-24 12:20:44 +00:00
|
|
|
&& cmake -DCMAKE_BUILD_TYPE=Release .. \
|
2020-07-25 10:46:31 +00:00
|
|
|
&& cmake --build . --target install -j $(grep -c ^processor /proc/cpuinfo) \
|
2019-02-24 12:20:44 +00:00
|
|
|
&& cd / \
|
|
|
|
&& rm -rf td
|
|
|
|
|
|
|
|
COPY config_site.h /
|
|
|
|
|
|
|
|
RUN source /opt/rh/devtoolset-7/enable \
|
2019-07-07 16:11:35 +00:00
|
|
|
&& git clone https://github.com/pjsip/pjproject.git \
|
2019-02-24 12:20:44 +00:00
|
|
|
&& cd pjproject \
|
2019-07-07 16:11:35 +00:00
|
|
|
&& git reset --hard 2.9 \
|
2019-02-24 12:20:44 +00:00
|
|
|
&& cp /config_site.h pjlib/include/pj \
|
|
|
|
&& ./configure --disable-sound CFLAGS="-O3 -DNDEBUG" \
|
2020-07-25 10:46:31 +00:00
|
|
|
&& make dep && make -j $(grep -c ^processor /proc/cpuinfo) && make install \
|
2019-02-24 12:20:44 +00:00
|
|
|
&& cd / \
|
|
|
|
&& rm -rf pjproject
|
|
|
|
|
|
|
|
RUN source /opt/rh/devtoolset-7/enable \
|
|
|
|
&& git clone -n https://github.com/gabime/spdlog.git \
|
|
|
|
&& cd spdlog \
|
|
|
|
&& git checkout tags/v0.17.0 \
|
|
|
|
&& mkdir build \
|
|
|
|
&& cd build \
|
|
|
|
&& cmake -DCMAKE_BUILD_TYPE=Release -DSPDLOG_BUILD_EXAMPLES=OFF -DSPDLOG_BUILD_TESTING=OFF .. \
|
2020-07-25 10:46:31 +00:00
|
|
|
&& cmake --build . --target install -j $(grep -c ^processor /proc/cpuinfo) \
|
2019-02-24 12:20:44 +00:00
|
|
|
&& cd / \
|
|
|
|
&& rm -rf spdlog
|
|
|
|
|
|
|
|
RUN source /opt/rh/devtoolset-7/enable \
|
|
|
|
&& git clone --recursive https://github.com/linuxdeploy/linuxdeploy.git \
|
|
|
|
&& cd linuxdeploy \
|
|
|
|
&& git checkout f9fc51a832185158d3e0e64858c83a941047871f \
|
|
|
|
&& mkdir build \
|
|
|
|
&& cd build \
|
|
|
|
&& export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig && cmake -DCMAKE_BUILD_TYPE=Release -DUSE_SYSTEM_CIMG=0 .. \
|
2020-07-25 10:46:31 +00:00
|
|
|
&& cmake --build . -j $(grep -c ^processor /proc/cpuinfo) \
|
2019-02-24 12:20:44 +00:00
|
|
|
&& cp bin/linuxdeploy /usr/local/bin \
|
|
|
|
&& cd / \
|
|
|
|
&& rm -rf linuxdeploy
|
|
|
|
|
|
|
|
COPY centos_entrypoint.sh /
|
|
|
|
|
|
|
|
ENTRYPOINT ["/centos_entrypoint.sh"]
|