tg2sip/buildenv/Dockerfile.centos7

75 lines
2.5 KiB
Docker
Raw Normal View History

2018-11-21 17:35:36 +00:00
FROM centos:7 as builder
2018-10-04 07:07:36 +00:00
2018-11-21 17:35:36 +00:00
# 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++
RUN yum install -y \
make \
git wget \
zlib-devel opus-devel openssl-devel gperf \
2020-07-25 20:57:15 +00:00
pkgconfig ccache gperf unzip \
libpng-devel libjpeg-devel \
epel-release \
&& yum install -y patchelf
2018-10-04 07:07:36 +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
2018-10-04 07:07:36 +00:00
COPY tdlib_header.patch /
COPY tdlib_threadname.patch /
# TDLib 1.7.10
2018-11-21 17:35:36 +00:00
RUN source /opt/rh/devtoolset-7/enable \
&& git clone https://github.com/tdlib/td.git \
2018-10-04 07:07:36 +00:00
&& cd td \
&& git reset --hard a53cb30e99f937cfd64e0266fa558785a184a553 \
2018-10-04 07:07:36 +00:00
&& git apply /tdlib_header.patch \
&& git apply /tdlib_threadname.patch \
&& mkdir build \
&& cd build \
&& cmake -DCMAKE_BUILD_TYPE=Release .. \
2020-07-25 10:46:31 +00:00
&& cmake --build . --target install -j $(grep -c ^processor /proc/cpuinfo) \
2018-10-04 07:07:36 +00:00
&& cd / \
&& rm -rf td
COPY config_site.h /
2018-11-21 17:35:36 +00:00
RUN source /opt/rh/devtoolset-7/enable \
&& git clone https://github.com/pjsip/pjproject.git \
2018-10-04 07:07:36 +00:00
&& cd pjproject \
&& git reset --hard 2.9 \
2018-10-04 07:07:36 +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 \
2018-10-04 07:07:36 +00:00
&& cd / \
&& rm -rf pjproject
2018-11-21 17:35:36 +00:00
RUN source /opt/rh/devtoolset-7/enable \
&& git clone -n https://github.com/gabime/spdlog.git \
2018-10-04 07:07:36 +00:00
&& 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) \
2018-10-04 07:07:36 +00:00
&& cd / \
2019-02-08 13:08:59 +00:00
&& rm -rf spdlog
2020-07-25 20:57:15 +00:00
RUN source /opt/rh/devtoolset-7/enable \
&& git clone https://github.com/linuxdeploy/linuxdeploy.git \
2020-07-25 20:57:15 +00:00
&& cd linuxdeploy \
&& git checkout 557bad2241df2c33972c7e6bdbf0c528cee27cc8 \
&& git submodule update --init --recursive \
2020-07-25 20:57:15 +00:00
&& mkdir build \
&& cd build \
&& export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig && cmake -DCMAKE_BUILD_TYPE=Release -DUSE_SYSTEM_CIMG=0 .. \
&& cmake --build . -j $(grep -c ^processor /proc/cpuinfo) \
&& cp bin/linuxdeploy /usr/local/bin \
&& cd / \
&& rm -rf linuxdeploy
2019-02-08 13:08:59 +00:00
COPY centos_entrypoint.sh /
ENTRYPOINT ["/centos_entrypoint.sh"]