bc-dev-centos7 2.2 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14
FROM centos:7

MAINTAINER Ghislain MARY <ghislain.mary@belledonne-communications.com>

#ENV RPM_BUILD_NCPUS=5
ENV SHELL=/bin/bash

# Configure additional repositories and install common general tools
RUN yum install -y epel-release && \
    rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro && rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-1.el7.nux.noarch.rpm && \
    yum install -y nano sudo which && \
    yum clean all

# Install development tools
15
RUN yum install -y at bison ccache clang cmake3 doxygen gcc-c++ gdb gettext-devel git graphviz libtool make nasm ninja-build patch pystache python-six python2-pip redhat-lsb-core rpm-build yasm && \
16
    yum clean all && \
17 18 19 20 21 22 23
    pip install sphinx javasphinx sphinx_csharp && \
    ln -s /usr/bin/ccmake3 /usr/bin/ccmake && \
    ln -s /usr/bin/cmake3 /usr/bin/cmake && \
    ln -s /usr/bin/cpack3 /usr/bin/cpack && \
    ln -s /usr/bin/ctest3 /usr/bin/ctest

# Install linphone & flexisp dependencies development packages
24
RUN yum install -y alsa-lib-devel ffmpeg-devel glew-devel gsm-devel jansson-devel libbsd-devel libsrtp-devel libv4l-devel libvpx-devel libXv-devel libxml2-devel mariadb-devel mbedtls-devel mesa-libEGL-devel net-snmp-devel openssh openssh-clients openssl-devel opus-devel postgresql-devel protobuf-devel pulseaudio-libs-devel speex-devel sqlite-devel xerces-c-devel xsd && \
25 26 27 28 29 30 31
    yum clean all

# Install linphone runtime dependencies
RUN yum install -y mesa-dri-drivers && \
    yum clean all && \
    dbus-uuidgen > /var/lib/dbus/machine-id

32 33 34 35 36 37
# Build qt5.10
RUN git clone https://gitlab.linphone.org/BC/public/linphone-desktop.git && \
    ./linphone-desktop/tools/build_qt_rpm && \
    rpm -i ./linphone-desktop/rpm-linphone-qt-5.10/rpmbuild/RPMS/x86_64/*.rpm && \
    mv ./linphone-desktop/rpm-linphone-qt-5.10/rpmbuild/RPMS/x86_64/*.rpm / && \
    rm -rf ./linphone-desktop
38 39 40 41 42 43

# Configure user bc
RUN useradd -ms /bin/bash bc && \
    echo 'bc:cotcot' | chpasswd && \
    echo 'bc ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers

44 45 46
ENV Qt5_DIR=/opt/com.belledonne-communications/linphone/lib/cmake
ENV PATH=$PATH:/opt/com.belledonne-communications/linphone/bin

47 48 49 50
USER bc
WORKDIR /home/bc
ENV PS1='\[\e[34m\]\u@bc-dev-centos7>\[\e[0m\] '
CMD bash