-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
184 lines (168 loc) · 5.88 KB
/
Dockerfile
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
# MingW64 + Qt5/Qt6 for cross-compile builds to Windows
# Based on ArchLinux image
# Note: pacman cache is cleared to reduce image size by a few 100 mbs in total.
# `pacman -Scc --noconfirm` responds 'N' by default to removing the cache, hence
# the echo mechanism.
FROM archlinux:latest AS base
ARG COMMIT_SHA
ARG PIPELINE_ID
LABEL org.opencontainers.image.url="https://git.simply-life.net/docker/mingw-qt5"
LABEL org.opencontainers.image.source="https://git.simply-life.net/docker/mingw-qt5"
LABEL org.opencontainers.image.revision="$COMMIT_SHA"
LABEL org.opencontainers.image.authors="Wouter Haffmans <[email protected]>"
LABEL org.opencontainers.image.version="$PIPELINE_ID"
# Update base system
RUN pacman-key --init \
&& pacman-key --populate \
&& pacman -Sy \
&& pacman -Su --noconfirm --noprogressbar archlinux-keyring pacman \
&& pacman-db-upgrade \
&& pacman -Su --noconfirm --noprogressbar ca-certificates \
&& trust extract-compat \
&& pacman -Syyu --noconfirm --noprogressbar \
&& (echo -e "y\ny\n" | pacman -Scc)
# Add martchus.no-ip.biz repo for mingw binaries
RUN echo "[ownstuff]" >> /etc/pacman.conf \
&& echo "Server = https://ftp.f3l.de/~martchus/\$repo/os/\$arch" >> /etc/pacman.conf \
&& echo "Server = https://martchus.no-ip.biz/repo/arch/\$repo/os/\$arch" >> /etc/pacman.conf \
&& pacman-key --recv-keys B9E36A7275FC61B464B67907E06FE8F53CDC6A4C \
&& pacman-key --finger B9E36A7275FC61B464B67907E06FE8F53CDC6A4C \
&& pacman-key --lsign-key B9E36A7275FC61B464B67907E06FE8F53CDC6A4C \
&& pacman -Sy
# Add some useful packages to the base system
RUN pacman -S --noconfirm --noprogressbar --needed \
imagemagick \
make \
ninja \
git \
binutils \
patch \
base-devel \
unzip \
protobuf \
&& (echo -e "y\ny\n" | pacman -Scc)
# Install core MingW packages
# Note: ownstuff/mingw-w64-gcc is chosen explicitly as it's currently more up-to-date and doesn't
# build broken packages (https://gitlab.archlinux.org/archlinux/packaging/packages/mingw-w64-gcc/-/issues/6)
RUN pacman -S --noconfirm --noprogressbar \
mingw-w64-binutils \
mingw-w64-crt \
ownstuff/mingw-w64-gcc \
mingw-w64-configure \
mingw-w64-headers \
mingw-w64-winpthreads \
mingw-w64-bzip2 \
mingw-w64-cmake \
mingw-w64-expat \
mingw-w64-extra-cmake-modules \
mingw-w64-fontconfig \
mingw-w64-freeglut \
mingw-w64-freetype2 \
mingw-w64-gettext \
mingw-w64-libdbus \
mingw-w64-libiconv \
mingw-w64-libjpeg-turbo \
mingw-w64-libpng \
mingw-w64-libtiff \
mingw-w64-libxml2 \
mingw-w64-mariadb-connector-c \
nsis \
mingw-w64-openssl \
mingw-w64-openjpeg \
mingw-w64-openjpeg2 \
mingw-w64-pcre \
mingw-w64-pdcurses \
mingw-w64-pkg-config \
mingw-w64-protobuf \
mingw-w64-readline \
mingw-w64-sdl2 \
mingw-w64-sqlite \
mingw-w64-termcap \
mingw-w64-tools \
mingw-w64-zlib \
&& (echo -e "y\ny\n" | pacman -Scc)
# Create devel user
RUN useradd -m -d /home/devel -u 1000 -U -G users,tty -s /bin/bash devel
USER devel
ENV HOME=/home/devel
WORKDIR /home/devel
# Back to devel user, but not for subsequent image builds
USER devel
ONBUILD USER root
ONBUILD WORKDIR /
FROM base AS qt5
# Install MingW packages
RUN pacman -S --noconfirm --noprogressbar \
mingw-w64-qt5-base \
mingw-w64-qt5-base-static \
mingw-w64-qt5-3d \
mingw-w64-qt5-connectivity \
mingw-w64-qt5-charts \
mingw-w64-qt5-datavis3d \
mingw-w64-qt5-declarative \
mingw-w64-qt5-gamepad \
mingw-w64-qt5-graphicaleffects \
mingw-w64-qt5-imageformats \
mingw-w64-qt5-location \
mingw-w64-qt5-multimedia \
mingw-w64-qt5-networkauth \
mingw-w64-qt5-quickcontrols \
mingw-w64-qt5-quickcontrols2 \
mingw-w64-qt5-remoteobjects \
mingw-w64-qt5-script \
mingw-w64-qt5-scxml \
mingw-w64-qt5-sensors \
mingw-w64-qt5-serialport \
mingw-w64-qt5-svg \
mingw-w64-qt5-virtualkeyboard \
mingw-w64-qt5-webchannel \
mingw-w64-qt5-webglplugin \
mingw-w64-qt5-websockets \
mingw-w64-qt5-winextras \
mingw-w64-qt5-xmlpatterns \
mingw-w64-qt5-tools \
mingw-w64-qt5-translations \
&& (echo -e "y\ny\n" | pacman -Scc)
# Back to devel user, but not for subsequent image builds
USER devel
ONBUILD USER root
ONBUILD WORKDIR /
FROM base AS qt6
# Install MingW packages, plus some native tools required for host info and linguist tools
RUN pacman -S --noconfirm --noprogressbar \
clang \
qt6-tools \
qt6-declarative \
mingw-w64-qt6-base \
mingw-w64-qt6-base-static \
mingw-w64-qt6-5compat \
mingw-w64-qt6-charts \
mingw-w64-qt6-connectivity \
mingw-w64-qt6-datavis3d \
mingw-w64-qt6-declarative \
mingw-w64-qt6-imageformats \
mingw-w64-qt6-location \
mingw-w64-qt6-lottie \
mingw-w64-qt6-multimedia \
mingw-w64-qt6-networkauth \
mingw-w64-qt6-positioning \
mingw-w64-qt6-quick3d \
mingw-w64-qt6-quicktimeline \
mingw-w64-qt6-scxml \
mingw-w64-qt6-sensors \
mingw-w64-qt6-serialbus \
mingw-w64-qt6-serialport \
mingw-w64-qt6-shadertools \
mingw-w64-qt6-svg \
mingw-w64-qt6-tools \
mingw-w64-qt6-translations \
mingw-w64-qt6-virtualkeyboard \
mingw-w64-qt6-webchannel \
mingw-w64-qt6-websockets \
mingw-w64-qt6-webview \
mingw-w64-kirigami \
&& (echo -e "y\ny\n" | pacman -Scc)
# Back to devel user, but not for subsequent image builds
USER devel
ONBUILD USER root
ONBUILD WORKDIR /