linux.x86.linphone/docker-files/bc-dev-ubuntu-22-04-lts
Peio Rigaux a74ef62634 Add QT proprietary versions for Linux to Dockerfile and docker image.
Add QT proprietary 5.15.14, 5.15.19, 6.8.1, 6.8.3 in Dockerfile.
Modified CI and dockerfile to use qtchooser, to keep the same behaviour without having to rely on a specific entrypoint.

Split opensource versions from proprietary versions by using a different directory.
2025-10-21 14:11:15 +02:00

157 lines
No EOL
8 KiB
Text

###############################################################################
# Dockerfile used to make gitlab.linphone.org:4567/bc/public/linphone-desktop/bc-dev-ubuntu-20-04-lts:20231024_add_multimedia
###############################################################################
FROM ubuntu:22.04
# Qt on Ubuntu 22.04 is too old. Use a downloader.
ARG QT_VERSION=5.15.2
ARG QT6_VERSION=6.9.1
#Do not use it. It seems that it cannot be used from python command.
#ARG QT_MODULES=qtnetworkauth qtquick3d qtmultimedia qt5compat qtshadertools
LABEL Gaelle Braud <gaelle.braud@belledonne-communications.com>
# Use a Swiss mirror
RUN sed -i -E 's/(archive|security)\.ubuntu\.com/ch.archive.ubuntu.com/' /etc/apt/sources.list
# add fallbacks for timeout connections.
#France
RUN echo "deb http://fr.archive.ubuntu.com/ubuntu/ jammy main restricted" >> /etc/apt/sources.list
RUN echo "deb http://security.ubuntu.com/ubuntu jammy-security main restricted" >> /etc/apt/sources.list
RUN echo "deb http://ch.archive.ubuntu.com/ubuntu/ jammy-updates main restricted" >> /etc/apt/sources.list
#Belgium
RUN echo "deb http://be.archive.ubuntu.com/ubuntu/ jammy main restricted" >> /etc/apt/sources.list
RUN echo "deb http://security.ubuntu.com/ubuntu jammy-security main restricted" >> /etc/apt/sources.list
RUN echo "deb http://be.archive.ubuntu.com/ubuntu/ jammy-updates main restricted" >> /etc/apt/sources.list
#International
RUN echo "deb http://archive.ubuntu.com/ubuntu/ jammy main restricted" >> /etc/apt/sources.list
RUN echo "deb http://security.ubuntu.com/ubuntu jammy-security main restricted" >> /etc/apt/sources.list
RUN echo "deb http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted" >> /etc/apt/sources.list
# Configure locale
RUN apt-get update && \
apt-get install -y locales && \
apt-get clean && \
echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \
locale-gen
ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'
ENV TZ=Europe/Paris
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
ARG DEBIAN_FRONTEND=noninteractive
ENV SHELL=/bin/bash
#ENV PS1='\[\e[33m\]\u@bc-dev-ubuntu-22-04>\[\e[0m\] '
# Install common general tools
RUN apt-get update && \
apt-get install -y nano sudo vim && \
apt-get clean
# Install development tools
RUN apt-get update && \
apt-get install -y alien at autoconf bison ccache clang doxygen elfutils g++ gdb git graphviz intltool libtool lsb-release make ninja-build openssh-client patch perl python3-pip python3-pystache python3-six python3-jsonschema python3-jinja2 meson yasm && \
apt-get clean
# Install linphone & flexisip dependencies development packages
RUN apt-get update && \
apt-get install -y libasound2-dev libbsd-dev libegl1-mesa-dev libglew-dev libgsm1-dev libjansson-dev libmariadb-dev-compat libmbedtls-dev libopus-dev libpq-dev libprotobuf-dev libpulse-dev libqt5svg5-dev libsnmp-dev libspeex-dev libspeexdsp-dev libsqlite3-dev libsrtp2-dev libssl-dev libswscale-dev libturbojpeg0-dev libv4l-dev libvpx-dev libxerces-c-dev libxml2-dev libxv-dev libxinerama-dev protobuf-compiler qttools5-dev qttools5-dev-tools xsdcxx cmake nasm && \
apt-get clean
# Install signing tools
RUN sudo apt-get install -y gnupg2
# Install configuration tools
RUN sudo apt-get install -y wget
# Configure user bc
RUN useradd -ms /bin/bash bc && \
echo 'bc:cotcot' | chpasswd && \
echo 'bc ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
########### QT
RUN sudo apt-get update && sudo apt-get install -y libxkbcommon* flite1-dev libspeechd-dev speech-dispatcher libfontconfig1-dev libfreetype6-dev libx11-dev libxext-dev libxfixes-dev libxi-dev libxrender-dev libx11-xcb* libxcb* qdbus-qt5 libqt5dbus5 libdbus-1-dev libdbus-glib-1-dev libatspi2.0-0 libatspi2.0-dev
RUN sudo apt-get update && sudo apt-get install -y libxcb-keysyms1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync0-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0-dev
USER bc
WORKDIR /home/bc
# RUN sudo apt install python3-pip --upgrade -y
RUN sudo apt install --upgrade -y python3-importlib-metadata
RUN sudo apt install --upgrade -y python3-setuptools
# RUN sudo apt install python3-ez_setup
## Install Qt download tool
# installation is split because there is a way where some modules are not downloaded in the first attempt.
RUN sudo apt install -y python3-py7zr
RUN sudo pip3 install --upgrade aqtinstall
RUN sudo python3 -m aqt install-qt linux desktop $QT_VERSION -O /opt/Qt/opensource
RUN sudo python3 -m aqt install-qt linux desktop $QT_VERSION -O /opt/Qt/opensource --noarchives -m qtnetworkauth qtquick3d
RUN sudo python3 -m aqt install-qt linux desktop $QT6_VERSION -O /opt/Qt/opensource
RUN sudo python3 -m aqt install-qt linux desktop $QT6_VERSION -O /opt/Qt/opensource --noarchives -m qtnetworkauth qtquick3d qtmultimedia qt5compat qtshadertools
RUN sudo chown -R bc:bc /opt/Qt/
RUN qtchooser -install $QT_VERSION /opt/Qt/opensource/$QT_VERSION/gcc_64/bin/qmake
RUN qtchooser -install $QT6_VERSION /opt/Qt/opensource/$QT6_VERSION/gcc_64/bin/qmake
# Download QT official installer for proprietary versions
# -O : name the destination file after the remote file name, in the current directory
# -L : follow http redirections
RUN curl -O -L https://download.qt.io/official_releases/online_installers/qt-online-installer-linux-x64-online.run
RUN chmod u+x qt-online-installer-linux-x64-online.run
RUN mkdir -p /home/bc/.local/share/Qt/
# Ask infra@belledonne-communications.com for these files
COPY qtaccount.ini /home/bc/.local/share/Qt/
COPY qtlicenses.ini /home/bc/.local/share/Qt/
RUN sudo chmod 600 /home/bc/.local/share/Qt/*
RUN sudo chown bc /home/bc/.local/share/Qt/*
# Install Qt 5.15.19 proprietary
RUN ./qt-online-installer-linux-x64-online.run \
--accept-licenses \
--accept-obligations \
--confirm-command \
--root "/opt/Qt/proprietary" \
--auto-answer OperationDoesNotExistError=Ignore,OverwriteTargetDirectory=Yes,stopProcessesForUpdates=Ignore,installationErrorWithCancel=Ignore,InstallationErrorWithIgnore=Ignore,AssociateCommonFiletypes=Yes,telemetry-question=No \
install qt.qt5.51519.gcc_64 qt.qt5.51519.qtnetworkauth qt.qt5.51519.qtquick3d
# Install Qt 5.15.14 proprietary
RUN /opt/Qt/proprietary/MaintenanceTool \
--accept-licenses \
--accept-obligations \
--confirm-command \
--root "/opt/Qt/proprietary" \
--auto-answer OperationDoesNotExistError=Ignore,OverwriteTargetDirectory=Yes,stopProcessesForUpdates=Ignore,installationErrorWithCancel=Ignore,InstallationErrorWithIgnore=Ignore,AssociateCommonFiletypes=Yes,telemetry-question=No \
install qt.qt5.51514.gcc_64 qt.qt5.51514.qtnetworkauth qt.qt5.51514.qtquick3d
# Install Qt 6.8.1 proprietary
RUN /opt/Qt/proprietary/MaintenanceTool \
--accept-licenses \
--accept-obligations \
--confirm-command \
--root "/opt/Qt/proprietary" \
--auto-answer OperationDoesNotExistError=Ignore,OverwriteTargetDirectory=Yes,stopProcessesForUpdates=Ignore,installationErrorWithCancel=Ignore,InstallationErrorWithIgnore=Ignore,AssociateCommonFiletypes=Yes,telemetry-question=No \
install qt.qt6.681.linux_gcc_64 qt.qt6.681.addons.qtnetworkauth qt.qt6.681.addons.qtquick3d qt.qt6.681.addons.qtmultimedia qt.qt6.681.addons.qt5compat qt.qt6.681.addons.qtshadertools
# # Install Qt 6.8.3 proprietary
RUN /opt/Qt/proprietary/MaintenanceTool \
--accept-licenses \
--accept-obligations \
--confirm-command \
--root "/opt/Qt/proprietary" \
--auto-answer OperationDoesNotExistError=Ignore,OverwriteTargetDirectory=Yes,stopProcessesForUpdates=Ignore,installationErrorWithCancel=Ignore,InstallationErrorWithIgnore=Ignore,AssociateCommonFiletypes=Yes,telemetry-question=No \
install qt.qt6.683.linux_gcc_64 qt.qt6.683.addons.qtnetworkauth qt.qt6.683.addons.qtquick3d qt.qt6.683.addons.qtmultimedia qt.qt6.683.addons.qt5compat qt.qt6.683.addons.qtshadertools
RUN qtchooser -install 5.15.19 /opt/Qt/proprietary/5.15.19/gcc_64/bin/qmake
RUN qtchooser -install 5.15.14 /opt/Qt/proprietary/5.15.14/gcc_64/bin/qmake
RUN qtchooser -install 6.8.1 /opt/Qt/proprietary/6.8.1/gcc_64/bin/qmake
RUN qtchooser -install 6.8.3 /opt/Qt/proprietary/6.8.3/gcc_64/bin/qmake
cmd bash