Files
tavro-build-linux/Dockerfile
Boris Shestov 56d453d671
Some checks failed
Build and publish docker image / Builds the image and publishes to docker hub (push) Has been cancelled
[DO-1573] Add xvfb package for test (#7)
[DO-1573]

Co-authored-by: Boris Shestov <boris.shestov@avroid.tech>
Reviewed-on: https://git.avroid.tech/Docker/tavro-build-linux/pulls/7
2025-02-10 16:56:55 +03:00

81 lines
2.6 KiB
Docker

ARG DOCKER_REGISTRY=harbor.avroid.tech
# https://hub.docker.com/_/ubuntu
FROM ${DOCKER_REGISTRY}/all/base-build-image:1.8
LABEL description="Linux image for Tavro build" \
tools.qt.version="5.15.14"
###QT BUILD###
ARG NEXUS_QT_REPO="qt_repo" \
VERSION=5.15.14
# Install packages for qt and dependencies
RUN apt update && \
apt install -y \
gperf \
libasound2-dev \
libavcodec-dev \
libavformat-dev \
libegl1-mesa-dev \
libgbm-dev \
libgles2-mesa-dev \
libglib2.0-dev \
libgstreamer1.0-dev \
libgstreamer-plugins-base1.0-dev \
libharfbuzz-dev \
libjpeg8-dev \
libopus-dev \
libopenh264-dev \
libpipewire-0.3-dev \
libpulse-dev \
libswscale-dev \
libssl-dev \
libvpx-dev \
libfontconfig1-dev \
libfreetype6-dev \
libx11-dev \
libx11-xcb-dev \
'^libxcb*' \
libxcomposite-dev \
libxdamage-dev \
libxext-dev \
libxfixes-dev \
libxi-dev \
libxkbcommon-dev \
libxkbcommon-x11-dev \
libxrender-dev \
libxtst-dev \
perl \
xvfb \
yasm && \
apt clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
#download, configure and build qt
COPY ./* /tmp/patches/
RUN wget ${NEXUS_URL}/repository/${NEXUS_QT_REPO}/v${VERSION}/qt-everywhere-opensource-src-${VERSION}.tar.xz && tar -xJf qt-everywhere-opensource-src-${VERSION}.tar.xz && \
ln -sf /usr/bin/python3 /usr/bin/python && rm qt-everywhere-opensource-src-${VERSION}.tar.xz && cd qt-everywhere* && \
#install patches \
patch -p1 < /tmp/patches/0015-remove-detected-xkb-keys.patch && \
sed -i '6i #include <cstdint>' qtlocation/src/3rdparty/mapbox-gl-native/include/mbgl/util/geometry.hpp && \
sed -i '7i #include <cstdint>' qtlocation/src/3rdparty/mapbox-gl-native/include/mbgl/util/string.hpp && \
sed -i '4i #include <cstdint>' qtlocation/src/3rdparty/mapbox-gl-native/src/mbgl/gl/stencil_mode.hpp && \
#configure and build qt \
./configure -release -opensource -confirm-license -nomake tests -nomake examples -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtdoc -skip qtmacextras -skip qtscript -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebview -skip qtwinextras -skip qtserialbus -xkbcommon -system-harfbuzz -system-libjpeg && \
make -j$(nproc) && make install -j$(nproc) && cd .. && rm -rf qt-everywhere* /tmp/patches
#Ужасный костыль
RUN ln -s /usr/lib/x86_64-linux-gnu/libvpx.so.9.0.0 /usr/lib/x86_64-linux-gnu/libvpx.so.7
# Personalization
#-------------------------------------------------------------------------------
#
ARG USER=ubuntu
ARG USER_HOME=/home/${USER}
USER ${USER}
WORKDIR ${USER_HOME}
CMD ["/bin/bash"]