-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.qt
103 lines (93 loc) · 2.9 KB
/
Dockerfile.qt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
ARG QT_VERSION=6.4.3
FROM rockylinux/rockylinux:8 AS base
RUN dnf install -y epel-release && \
dnf install --enablerepo=powertools -y \
# Qt Requirement:
alsa-lib \
ccache \
cmake \
# Qt Requirement:
cups-libs \
gcc-toolset-12 \
gcc-toolset-12-gcc-c++ \
file \
git \
# Qt Requirement:
fontconfig \
# Qt Requirement:
libxkbcommon-x11 \
# Qt Requirement:
libXcomposite-devel \
# Qt Requirement:
libXcursor-devel \
# Qt Requirement:
libXi-devel \
# Qt Requirement:
libXrandr-devel \
# Qt Requirement:
libXtst-devel \
# Qt Requirement:
mesa-libGL-devel \
# Qt Requirement:
mysql-libs \
# Qt Requirement:
postgresql-odbc \
# Qt Requirement:
xcb-util-cursor \
# Qt Requirement:
xcb-util-image \
# Qt Requirement:
xcb-util-keysyms \
# Qt Requirement:
xcb-util-renderutil \
# Qt Requirement:
xcb-util-wm \
make \
ninja-build \
perl \
unzip \
zlib && dnf clean all -y && rm -rf /var/cache/dnf
ENV BASH_ENV=/opt/rh/gcc-toolset-12/enable \
ENV=/opt/rh/gcc-toolset-12/enable \
PROMPT_COMMAND=". /opt/rh/gcc-toolset-12/enable"
FROM base AS extract
ARG QT_VERSION
### Linux deploy script
ADD https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage /opt/linuxdeploy.AppImage
RUN chmod +x /opt/linuxdeploy.AppImage
RUN /opt/linuxdeploy.AppImage --appimage-extract
RUN rm -rf /opt/linuxdeploy.AppImage
RUN mv /squashfs-root /linuxdeploy
RUN chmod -R 755 /linuxdeploy
# Linux deploy Qt plugin
ADD https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage /opt/linuxdeploy-plugin-qt.AppImage
RUN chmod +x /opt/linuxdeploy-plugin-qt.AppImage
RUN /opt/linuxdeploy-plugin-qt.AppImage --appimage-extract
RUN rm -rf /opt/linuxdeploy-plugin-qt.AppImage
RUN mv /squashfs-root /linuxdeploy-plugin-qt
RUN chmod -R 755 /linuxdeploy-plugin-qt
# appimagetool
ADD https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage /opt/appimagetool.AppImage
RUN chmod +x /opt/appimagetool.AppImage
RUN /opt/appimagetool.AppImage --appimage-extract
RUN rm -rf /opt/appimagetool.AppImage
RUN mv /squashfs-root /appimagetool
RUN chmod -R 755 /appimagetool
### Install Qt using aqt installer
RUN dnf install -y \
python39 \
python39-devel \
python39-pip && dnf clean all -y && rm -rf /var/cache/dnf
RUN pip3.9 install -U setuptools wheel
RUN source /opt/rh/gcc-toolset-12/enable && pip3.9 install aqtinstall
RUN aqt install-qt -O /qt linux desktop $QT_VERSION -m qtwebsockets
FROM base
ARG QT_VERSION
COPY --from=extract /linuxdeploy /linuxdeploy
COPY --from=extract /linuxdeploy-plugin-qt /linuxdeploy-plugin-qt
COPY --from=extract /appimagetool /appimagetool
COPY --from=extract /qt /qt
ENV QTDIR=/qt/$QT_VERSION/gcc_64
ENV PATH=$QTDIR/bin:/linuxdeploy/usr/bin:/linuxdeploy-plugin-qt/usr/bin:/appimagetool/usr/bin:$PATH
ENV QT_PLUGIN_PATH=$QTDIR/plugins
ENV LD_LIBRARY_PATH=/qt/$QT_VERSION/gcc_64/lib:$LD_LIBRARY_PATH