linphone-desktop/docker-files/bc-dev-ubuntu-22-04-lts
Alexandre Jörgensen ae8b49ba1a Update QT to 6.10.0 and increase security:
* Use QT 6.10.0
* Change invalidateFilter (deprecated) to beginFilterChange/endFilterChange
* Remove warning of presenceStatusItem
* Add changelog with this modification for 6.1.0

* Do not use anymore variables to build docker images. Qt versions are now hardcoded in images to allow multiple opensource Qt versions.
2025-12-04 11:00:33 +01:00

176 lines
No EOL
9.6 KiB
Text

###############################################################################
# Dockerfile used to make gitlab.linphone.org:4567/bc/public/linphone-desktop/bc-dev-ubuntu-22-04-lts:20251106_add_commercial_qt_version_5.15.14_5.15.19_6.8.1_6.8.3_6.9.1_6.10.0
###############################################################################
FROM ubuntu:22.04
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 5.15.2 -O /opt/Qt/opensource
RUN sudo python3 -m aqt install-qt linux desktop 5.15.2 -O /opt/Qt/opensource --noarchives -m qtnetworkauth qtquick3d
RUN sudo python3 -m aqt install-qt linux desktop 6.9.1 -O /opt/Qt/opensource
RUN sudo python3 -m aqt install-qt linux desktop 6.9.1 -O /opt/Qt/opensource --noarchives -m qtnetworkauth qtquick3d qtmultimedia qt5compat qtshadertools
RUN sudo python3 -m aqt install-qt linux desktop 6.10.0 -O /opt/Qt/opensource
RUN sudo python3 -m aqt install-qt linux desktop 6.10.0 -O /opt/Qt/opensource --noarchives -m qtnetworkauth qtquick3d qtmultimedia qt5compat qtshadertools
RUN sudo chown -R bc:bc /opt/Qt/
RUN qtchooser -install "5.15.2-opensource" /opt/Qt/opensource/5.15.2/gcc_64/bin/qmake
RUN qtchooser -install "6.9.1-opensource" /opt/Qt/opensource/6.9.1/gcc_64/bin/qmake
RUN qtchooser -install "6.10.0-opensource" /opt/Qt/opensource/6.10.0/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
# # Install Qt 6.9.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.691.linux_gcc_64 qt.qt6.691.addons.qtnetworkauth qt.qt6.691.addons.qtquick3d qt.qt6.691.addons.qtmultimedia qt.qt6.691.addons.qt5compat qt.qt6.691.addons.qtshadertools
# # Install Qt 6.10.0 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.6100.linux_gcc_64 qt.qt6.6100.addons.qtnetworkauth qt.qt6.6100.addons.qtquick3d qt.qt6.6100.addons.qtmultimedia qt.qt6.6100.addons.qt5compat qt.qt6.6100.addons.qtshadertools
RUN qtchooser -install 5.15.19-proprietary /opt/Qt/proprietary/5.15.19/gcc_64/bin/qmake
RUN qtchooser -install 5.15.14-proprietary /opt/Qt/proprietary/5.15.14/gcc_64/bin/qmake
RUN qtchooser -install 6.8.1-proprietary /opt/Qt/proprietary/6.8.1/gcc_64/bin/qmake
RUN qtchooser -install 6.8.3-proprietary /opt/Qt/proprietary/6.8.3/gcc_64/bin/qmake
RUN qtchooser -install 6.9.1-proprietary /opt/Qt/proprietary/6.9.1/gcc_64/bin/qmake
RUN qtchooser -install 6.10.0-proprietary /opt/Qt/proprietary/6.10.0/gcc_64/bin/qmake
RUN rm -f /home/bc/.local/share/Qt/qtaccount.ini
RUN rm -f /home/bc/.local/share/Qt/qtlicenses.ini
cmd bash