Commit 694856b2 authored by François Grisez's avatar François Grisez
Browse files

Install Python3 in each docker image.

parent 129333bb
Pipeline #28692 failed with stages
in 5 minutes and 33 seconds
......@@ -5,7 +5,7 @@
job-archlinux-latest-makefile-gcc:
tags: [ "docker-archlinux-latest" ]
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-archlinux:latest
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-archlinux:$ARCHLINUX_IMAGE_VERSION
except:
variables:
- $DEPLOY_RUN
......@@ -21,7 +21,7 @@ job-archlinux-latest-makefile-gcc:
job-archlinux-latest-makefile-clang:
tags: [ "docker-archlinux-latest" ]
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-archlinux:latest
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-archlinux:$ARCHLINUX_IMAGE_VERSION
except:
variables:
- $DEPLOY_RUN
......@@ -40,7 +40,7 @@ job-archlinux-latest-makefile-clang:
job-archlinux-latest-ninja-gcc:
tags: [ "docker-archlinux-latest" ]
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-archlinux:latest
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-archlinux:$ARCHLINUX_IMAGE_VERSION
except:
variables:
- $DEPLOY_RUN
......@@ -55,7 +55,7 @@ job-archlinux-latest-ninja-gcc:
job-archlinux-latest-ninja-clang:
tags: [ "docker-archlinux-latest" ]
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-archlinux:latest
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-archlinux:$ARCHLINUX_IMAGE_VERSION
except:
variables:
- $DEPLOY_RUN
......@@ -64,4 +64,4 @@ job-archlinux-latest-ninja-clang:
CMAKE_GENERATOR: Ninja
CC: clang
CXX: clang++
extends: .scheduled-job-linux
\ No newline at end of file
extends: .scheduled-job-linux
......@@ -5,7 +5,7 @@
job-centos7-makefile-gcc:
tags: [ "docker" ]
image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-centos:7
image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-centos7:$CENTOS_7_IMAGE_VERSION
except:
variables:
- $DEPLOY_RUN
......@@ -23,7 +23,7 @@ job-centos7-makefile-gcc:
job-centos7-makefile-clang:
tags: [ "docker" ]
image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-centos:7
image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-centos7:$CENTOS_7_IMAGE_VERSION
except:
variables:
- $DEPLOY_RUN
......@@ -43,7 +43,7 @@ job-centos7-makefile-clang:
#job-centos7-ninja-gcc:
#
# image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-centos:7
# image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-centos7:$CENTOS_7_IMAGE_VERSION
# variables:
# CMAKE_GENERATOR: Ninja
# CC: gcc
......@@ -53,7 +53,7 @@ job-centos7-makefile-clang:
#job-centos7-ninja-clang:
#
# image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-centos:7
# image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-centos7:$CENTOS_7_IMAGE_VERSION
# variables:
# CMAKE_GENERATOR: Ninja
# CC: clang
......@@ -66,7 +66,7 @@ job-centos7-makefile-clang:
job-centos7-rpm:
tags: [ "docker" ]
image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-centos:7
image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-centos7:$CENTOS_7_IMAGE_VERSION
extends: .job-linux-rpm
before_script:
- source /opt/rh/devtoolset-8/enable
......
......@@ -5,7 +5,7 @@
job-centos8-makefile-gcc:
tags: [ "docker" ]
image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-centos:8
image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-centos8:$CENTOS_8_IMAGE_VERSION
except:
variables:
- $DEPLOY_RUN
......@@ -20,7 +20,7 @@ job-centos8-makefile-gcc:
job-centos8-makefile-clang:
tags: [ "docker" ]
image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-centos:8
image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-centos8:$CENTOS_8_IMAGE_VERSION
except:
variables:
- $DEPLOY_RUN
......@@ -38,7 +38,7 @@ job-centos8-makefile-clang:
#job-centos8-ninja-gcc:
#
# image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-centos:8
# image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-centos8:$CENTOS_8_IMAGE_VERSION
# variables:
# CMAKE_GENERATOR: Ninja
# CC: gcc
......@@ -48,7 +48,7 @@ job-centos8-makefile-clang:
#job-centos8-ninja-clang:
#
# image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-centos:8
# image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-centos8:$CENTOS_8_IMAGE_VERSION
# variables:
# CMAKE_GENERATOR: Ninja
# CC: clang
......@@ -60,12 +60,12 @@ job-centos8-makefile-clang:
#################################################
job-centos8-rpm:
allow_failure: true
tags: [ "docker" ]
image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-centos:8
image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-centos8:$CENTOS_8_IMAGE_VERSION
extends: .job-linux-rpm
job-centos8-rpm-deploy:
stage: deploy
tags: [ "deploy" ]
......
......@@ -5,7 +5,7 @@
job-debian10-makefile-gcc:
tags: [ "docker-debian10" ]
image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-debian:10
image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-debian10:$DEBIAN_10_IMAGE_VERSION
except:
variables:
- $DEPLOY_RUN
......@@ -21,7 +21,7 @@ job-debian10-makefile-gcc:
job-debian10-makefile-clang:
tags: [ "docker-debian10" ]
image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-debian:10
image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-debian10:$DEBIAN_10_IMAGE_VERSION
except:
variables:
- $DEPLOY_RUN
......@@ -40,7 +40,7 @@ job-debian10-makefile-clang:
job-debian10-ninja-gcc:
tags: [ "docker-debian10" ]
image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-debian:10
image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-debian10:$DEBIAN_10_IMAGE_VERSION
except:
variables:
- $DEPLOY_RUN
......@@ -55,7 +55,7 @@ job-debian10-ninja-gcc:
job-debian10-ninja-clang:
tags: [ "docker-debian10" ]
image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-debian:10
image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-debian10:$DEBIAN_10_IMAGE_VERSION
except:
variables:
- $DEPLOY_RUN
......@@ -72,7 +72,7 @@ job-debian10-ninja-clang:
job-debian10-xwiki-doc-deploy:
stage: build
tags: [ "docker" ]
image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-debian:10
image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-debian10:$DEBIAN_10_IMAGE_VERSION
only:
variables:
......@@ -93,7 +93,7 @@ job-debian10-xwiki-doc-deploy:
job-debian10-deb:
tags: [ "docker-debian10" ]
image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-debian:10
image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-debian10:$DEBIAN_10_IMAGE_VERSION
extends: .job-linux-deb
except:
variables:
......
#################################################
# Makefile
#################################################
job-debian8-makefile-gcc:
tags: [ "docker-debian8" ]
image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-debian:8
except:
variables:
- $DEPLOY_RUN
- $DEPLOY_UBUNTU
variables:
CMAKE_GENERATOR: Unix Makefiles
CC: gcc
CXX: g++
ADDITIONAL_BUILD_OPTIONS: -j$MAKEFILE_JOBS
extends: .scheduled-job-linux
job-debian8-makefile-clang:
tags: [ "docker-debian8" ]
image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-debian:8
except:
variables:
- $DEPLOY_RUN
- $DEPLOY_UBUNTU
variables:
CMAKE_GENERATOR: Unix Makefiles
CC: clang
CXX: clang++
ADDITIONAL_BUILD_OPTIONS: -j$MAKEFILE_JOBS
extends: .scheduled-job-linux
#################################################
# Ninja
#################################################
job-debian8-ninja-gcc:
tags: [ "docker-debian8" ]
image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-debian:8
except:
variables:
- $DEPLOY_RUN
- $DEPLOY_UBUNTU
variables:
CMAKE_GENERATOR: Ninja
CC: gcc
CXX: g++
extends: .job-linux
job-debian8-ninja-clang:
tags: [ "docker-debian8" ]
image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-debian:8
except:
variables:
- $DEPLOY_RUN
- $DEPLOY_UBUNTU
variables:
CMAKE_GENERATOR: Ninja
CC: clang
CXX: clang++
extends: .scheduled-job-linux
#################################################
# DEB
#################################################
job-debian8-deb:
except:
variables:
- $DEPLOY_UBUNTU
tags: [ "docker-debian8" ]
image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-debian:8
extends: .job-linux-deb
job-debian8-deb-deploy:
except:
variables:
- $DEPLOY_UBUNTU
variables:
RELEASE: jessie
FREIGHT_PATH: $DEBIAN_FREIGHT_CONF_PATH
extends: .job-debian-deb-deploy
dependencies:
- job-debian8-deb
......@@ -5,7 +5,7 @@
job-debian9-makefile-gcc:
tags: [ "docker-debian9" ]
image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-debian:9
image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-debian9:$DEBIAN_9_IMAGE_VERSION
except:
variables:
- $DEPLOY_RUN
......@@ -21,7 +21,7 @@ job-debian9-makefile-gcc:
job-debian9-makefile-clang:
tags: [ "docker-debian9" ]
image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-debian:9
image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-debian9:$DEBIAN_9_IMAGE_VERSION
except:
variables:
- $DEPLOY_RUN
......@@ -40,7 +40,7 @@ job-debian9-makefile-clang:
job-debian9-ninja-gcc:
tags: [ "docker-debian9" ]
image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-debian:9
image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-debian9:$DEBIAN_9_IMAGE_VERSION
except:
variables:
- $DEPLOY_RUN
......@@ -55,7 +55,7 @@ job-debian9-ninja-gcc:
job-debian9-ninja-clang:
tags: [ "docker-debian9" ]
image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-debian:9
image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-debian9:$DEBIAN_9_IMAGE_VERSION
except:
variables:
- $DEPLOY_RUN
......@@ -74,7 +74,7 @@ job-debian9-ninja-clang:
job-debian9-deb:
tags: [ "docker-debian9" ]
image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-debian:9
image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-debian9:$DEBIAN_9_IMAGE_VERSION
extends: .job-linux-deb
except:
variables:
......
......@@ -5,7 +5,7 @@
job-ubuntu-18.04-makefile-gcc:
tags: [ "docker-ubuntu-18.04" ]
image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-ubuntu:18.04
image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-ubuntu-18-04-lts:$UBUNTU_18_04_IMAGE_VERSION
except:
variables:
- $DEPLOY_RUN
......@@ -21,7 +21,7 @@ job-ubuntu-18.04-makefile-gcc:
job-ubuntu-18.04-makefile-clang:
tags: [ "docker-ubuntu-18.04" ]
image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-ubuntu:18.04
image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-ubuntu-18-04-lts:$UBUNTU_18_04_IMAGE_VERSION
except:
variables:
- $DEPLOY_RUN
......@@ -40,7 +40,7 @@ job-ubuntu-18.04-makefile-clang:
job-ubuntu-18.04-ninja-gcc:
tags: [ "docker-ubuntu-18.04" ]
image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-ubuntu:18.04
image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-ubuntu-18-04-lts:$UBUNTU_18_04_IMAGE_VERSION
except:
variables:
- $DEPLOY_RUN
......@@ -55,7 +55,7 @@ job-ubuntu-18.04-ninja-gcc:
job-ubuntu-18.04-ninja-clang:
tags: [ "docker-ubuntu-18.04" ]
image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-ubuntu:18.04
image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-ubuntu-18-04-lts:$UBUNTU_18_04_IMAGE_VERSION
except:
variables:
- $DEPLOY_RUN
......@@ -73,7 +73,7 @@ job-ubuntu-18.04-ninja-clang:
job-ubuntu-18.04-deb:
tags: [ "docker-ubuntu-18.04" ]
image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-ubuntu:18.04
image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-ubuntu-18-04-lts:$UBUNTU_18_04_IMAGE_VERSION
extends: .job-linux-deb
only:
- schedules
......
......@@ -5,7 +5,7 @@
job-ubuntu-rolling-makefile-gcc:
tags: [ "docker-ubuntu-rolling" ]
image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-ubuntu:rolling
image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-ubuntu-rolling:$UBUNTU_ROLLING_IMAGE_VERSION
variables:
CMAKE_GENERATOR: Unix Makefiles
CC: gcc
......@@ -21,7 +21,7 @@ job-ubuntu-rolling-makefile-gcc:
job-ubuntu-rolling-makefile-clang:
tags: [ "docker-ubuntu-rolling" ]
image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-ubuntu:rolling
image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-ubuntu-rolling:$UBUNTU_ROLLING_IMAGE_VERSION
except:
variables:
- $DEPLOY_RUN
......@@ -40,7 +40,7 @@ job-ubuntu-rolling-makefile-clang:
job-ubuntu-rolling-ninja-gcc:
tags: [ "docker-ubuntu-rolling" ]
image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-ubuntu:rolling
image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-ubuntu-rolling:$UBUNTU_ROLLING_IMAGE_VERSION
except:
variables:
- $DEPLOY_RUN
......@@ -55,7 +55,7 @@ job-ubuntu-rolling-ninja-gcc:
job-ubuntu-rolling-ninja-clang:
tags: [ "docker-ubuntu-rolling" ]
image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-ubuntu:rolling
image: gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-ubuntu-rolling:$UBUNTU_ROLLING_IMAGE_VERSION
except:
variables:
- $DEPLOY_RUN
......
......@@ -9,6 +9,15 @@ variables:
DEFAULT_CMAKE_OPTIONS: -DENABLE_CONFERENCE=ON -DENABLE_JWE_AUTH_PLUGIN=ON -DENABLE_EXTERNAL_AUTH_PLUGIN=ON -DENABLE_PRESENCE=ON -DENABLE_PROTOBUF=ON -DENABLE_SNMP=ON -DENABLE_SOCI=ON -DENABLE_TRANSCODER=ON
DEFAULT_MACOS_CMAKE_OPTIONS: -DENABLE_CONFERENCE=ON -DENABLE_JWE_AUTH_PLUGIN=ON -DENABLE_PRESENCE=ON -DENABLE_PROTOBUF=ON -DENABLE_SNMP=OFF -DENABLE_SOCI=ON -DENABLE_TRANSCODER=ON
# Docker image version
ARCHLINUX_IMAGE_VERSION: latest
CENTOS_7_IMAGE_VERSION: 20210421_python3
CENTOS_8_IMAGE_VERSION: 20210421_python3
DEBIAN_9_IMAGE_VERSION: 20210421_python3
DEBIAN_10_IMAGE_VERSION: 20210421_python3
UBUNTU_18_04_IMAGE_VERSION: 20210421_python3
UBUNTU_ROLLING_IMAGE_VERSION: 20210419_python3
before_script:
- git submodule foreach --recursive git fetch --tags
......@@ -24,7 +33,7 @@ include:
- '.gitlab-ci-files/job-linux-debian9.yml'
- '.gitlab-ci-files/job-linux-debian10.yml'
# - '.gitlab-ci-files/job-linux-ubuntu-rolling.yml'
# - '.gitlab-ci-files/job-linux-ubuntu-18.04.yml'
- '.gitlab-ci-files/job-linux-ubuntu-18.04.yml'
- '.gitlab-ci-files/job-macosx.yml'
......
FROM gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-centos:7
FROM gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-centos7:20210421_python3_fix_pip
MAINTAINER François Grisez <francois.grisez@belledonne-communications.com>
# Install extra Flexisip dependencies
RUN sudo yum install -y jansson-devel libnghttp2-devel net-snmp-devel protobuf-devel
RUN sudo su -c 'yum -y install jansson-devel libnghttp2-devel net-snmp-devel protobuf-devel && yum -y clean all'
FROM gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-centos:8
FROM gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-centos8:20210421_python3_fix_pip
MAINTAINER François Grisez <francois.grisez@belledonne-communications.com>
# Install extra Flexisip dependencies
RUN sudo dnf --enablerepo=PowerTools install -y speexdsp-devel jansson-devel libnghttp2-devel net-snmp-devel protobuf-devel
RUN sudo su -c 'dnf -y install speexdsp-devel jansson-devel libnghttp2-devel net-snmp-devel protobuf-devel && dnf -y clean all'
# Create /usr/bin/python symbolic link
RUN sudo ln -s /usr/bin/python2 /usr/bin/python
FROM gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-debian:10
FROM gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-debian10:20210421_python3_fix_pip
MAINTAINER François Grisez <francois.grisez@belledonne-communications.com>
# Add extra dependencies for Flexisip
RUN sudo apt-get install -y libjansson-dev libmariadb-dev-compat libnghttp2-dev libprotobuf-dev libsnmp-dev protobuf-compiler
RUN sudo su -c 'apt-get -y update && apt-get -y install libjansson-dev libmariadb-dev-compat libnghttp2-dev libprotobuf-dev libsnmp-dev protobuf-compiler && apt-get -y clean'
# Configure OpenSSL policy
# Setting 'CipherString' to 'DEFAULT@SECLEVEL=1' forces libssl to allow
# certificates which are signed with a SHA1 digest algorithm. This must
# be done because BC's internal CA uses SHA1 for signatures, which is
# forbidden by default since libssl v1.1.
# Please keep this modification until the CA certificates has been updated
# in each project.
RUN sudo sed -i -E 's/^CipherString[ ]*=(.*)$/CipherString = DEFAULT@SECLEVEL=1/' /etc/ssl/openssl.cnf
FROM gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-debian:8
MAINTAINER François Grisez <francois.grisez@belledonne-communications.com>
# Add extra dependencies for Flexisip
RUN sudo apt-get install -y libjansson-dev libnghttp2-dev libprotobuf-dev libsnmp-dev protobuf-compiler
FROM gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-debian:9
FROM gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-debian9:20210421_python3_fix_pip
MAINTAINER François Grisez <francois.grisez@belledonne-communications.com>
# Add extra dependencies for Flexisip
RUN sudo apt-get install -y libjansson-dev libnghttp2-dev libprotobuf-dev libsnmp-dev protobuf-compiler
RUN sudo su -c 'apt-get -y update && apt-get -y install libjansson-dev libnghttp2-dev libprotobuf-dev libsnmp-dev protobuf-compiler && apt-get -y clean'
# Custom macros for Alien to build with CMake
COPY --chown=bc rpmmacros /home/bc/.rpmmacros
FROM gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-ubuntu:18.04
FROM gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-ubuntu-18-04-lts:20210421_python3_fix_pip
MAINTAINER François Grisez <francois.grisez@belledonne-communications.com>
# Install extra Flexisip dependencies
RUN sudo apt-get install -y libjansson-dev libnghttp2-dev libprotobuf-dev libsnmp-dev protobuf-compiler
RUN sudo su -c 'apt-get -y update && apt-get -y install libjansson-dev libnghttp2-dev libprotobuf-dev libsnmp-dev protobuf-compiler && apt-get -y clean'
FROM gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-ubuntu:rolling
FROM gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-ubuntu-rolling:20210217_python3
MAINTAINER François Grisez <francois.grisez@belledonne-communications.com>
# Install extra Flexisip dependencies
RUN sudo apt-get install -y libjansson-dev libnghttp2-dev libprotobuf-dev libsnmp-dev protobuf-compiler
RUN sudo su -c 'apt-get -y update && apt-get -y install libjansson-dev libnghttp2-dev libprotobuf-dev libsnmp-dev protobuf-compiler && apt-get -y clean'
FROM gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-debian:10
FROM gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-debian10:20210421_python3
MAINTAINER Jehan Monnier <jehan.monnier@linphone.org>
ARG njobs=1
ARG sanitizer=OFF
USER root
WORKDIR /root
# Some Python modules are available as 'bc' user only.
USER bc
WORKDIR /home/bc
RUN apt-get install -y iptables
RUN sudo apt-get install -y iptables
#get source code
COPY . flexisip/
# Get source code
COPY --chown=bc:bc . flexisip/
# configure & build
# Configure & build
RUN cd flexisip \
&& sudo install -o bc -g bc -m 755 -d /opt/belledonne-communications \
&& ./prepare.py -c \
&& ./prepare.py flexisip -d -DENABLE_SANITIZER=${sanitizer} -DENABLE_CONFERENCE=ON -DENABLE_JWE_AUTH_PLUGIN=ON -DENABLE_EXTERNAL_AUTH_PLUGIN=ON \
-DENABLE_PRESENCE=ON -DENABLE_PROTOBUF=ON -DENABLE_SNMP=ON -DENABLE_SOCI=ON -DENABLE_TRANSCODER=ON \
-DCMAKE_PREFIX_PATH=/opt/belledonne-communications -DCMAKE_INSTALL_PREFIX=/opt/belledonne-communications -DSYSCONF_INSTALL_DIR=/etc \
&& make -j ${njobs}
&& make -j ${njobs} \
&& sudo chown -R root:root /opt/belledonne-communications
# cleanup
# Cleanup
RUN rm -rf flexisip
# Switch to 'root' user
USER root
WORKDIR /root
# Add Flexisip bindir to the default path
ENV PATH=/opt/belledonne-communications/bin:$PATH
# create volumes for Flexisip configuration and logs
# Create volumes for Flexisip configuration and logs
RUN mkdir -p /var/opt/belledonne-communications/flexisip /etc/flexisip /home/cores
VOLUME /etc/flexisip
VOLUME /var/opt/belledonne-communications/log/flexisip
......
#
# Macros for cmake
#
%_cmake_lib_suffix64 -DLIB_SUFFIX=64
%_cmake_skip_rpath -DCMAKE_SKIP_RPATH:BOOL=ON
%_cmake_version 3.2.3
%__cmake cmake
# - Set default compile flags
# - CMAKE_*_FLAGS_RELEASE are added *after* the *FLAGS environment variables
# and default to -O3 -DNDEBUG. Strip the -O3 so we can override with *FLAGS
# - Turn on verbose makefiles so we can see and verify compile flags
# - Set default install prefixes and library install directories
# - Turn on shared libraries by default
%cmake \
CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
FFLAGS="${FFLAGS:-%optflags%{?_fmoddir: -I%_fmoddir}}" ; export FFLAGS ; \
FCFLAGS="${FCFLAGS:-%optflags%{?_fmoddir: -I%_fmoddir}}" ; export FCFLAGS ; \
%{?__global_ldflags:LDFLAGS="${LDFLAGS:-%__global_ldflags}" ; export LDFLAGS ;} \
%__cmake \\\
-DCMAKE_C_FLAGS_RELEASE:STRING="-DNDEBUG" \\\
-DCMAKE_CXX_FLAGS_RELEASE:STRING="-DNDEBUG" \\\
-DCMAKE_Fortran_FLAGS_RELEASE:STRING="-DNDEBUG" \\\
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \\\
-DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \\\
-DINCLUDE_INSTALL_DIR:PATH=%{_includedir} \\\
-DLIB_INSTALL_DIR:PATH=%{_libdir} \\\
-DSYSCONF_INSTALL_DIR:PATH=%{_sysconfdir} \\\
-DSHARE_INSTALL_PREFIX:PATH=%{_datadir} \\\
%if "%{?_lib}" == "lib64" \
%{?_cmake_lib_suffix64} \\\
%endif \
-DBUILD_SHARED_LIBS:BOOL=ON
#
# Macros for systemd
#
%_unitdir /lib/systemd/system
%systemd_requires \
Requires(post): systemd \
Requires(preun): systemd \
Requires(postun): systemd \
%{nil}
%systemd_post() \
if [ $1 -eq 1 ] ; then \
# Initial installation \
systemctl preset %{?*} >/dev/null 2>&1 || : \
fi \
%{nil}
%systemd_preun() \
if [ $1 -eq 0 ] ; then \
# Package removal, not upgrade \
systemctl --no-reload disable %{?*} > /dev/null 2>&1 || : \
systemctl stop %{?*} > /dev/null 2>&1 || : \
fi \
%{nil}
%systemd_postun() \
systemctl daemon-reload >/dev/null 2>&1 || : \
%{nil}