Skip to content

Commit 89c6363

Browse files
committed
Add more platforms to main Dockerfile
This also adds linuxdeploy-plugin-qt Fixes #7
1 parent 2e5a781 commit 89c6363

File tree

3 files changed

+51
-5
lines changed

3 files changed

+51
-5
lines changed

.github/workflows/docker.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,12 @@ jobs:
2222
name: ${{ matrix.platform }}-image
2323
strategy:
2424
matrix:
25-
platform: ['linux/amd64', 'linux/arm64', 'linux/arm/v7']
25+
platform:
26+
- linux/amd64
27+
- linux/arm64
28+
- linux/arm/v7
29+
- linux/ppc64le
30+
- linux/s390x
2631
fail-fast: true
2732
steps:
2833
-

Dockerfile

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,44 @@ RUN \
2929
-DBUILD_TESTING=OFF && \
3030
make -j $(nproc) && make install && \
3131
cd .. && rm -rf AppImageKit
32-
RUN curl -LO https://github.com/linuxdeploy/linuxdeploy-plugin-gtk/blob/master/linuxdeploy-plugin-gtk.sh
32+
33+
WORKDIR /home/builder/.local/bin
34+
RUN \
35+
curl -LO https://github.com/linuxdeploy/linuxdeploy-plugin-gtk/raw/97290a3e374381e9fa7983ba098729a37076f3ed/linuxdeploy-plugin-gtk.sh && \
36+
chmod +x linuxdeploy-plugin-gtk.sh
37+
3338

3439
USER root
3540
ARG DEBIAN_FRONTEND=noninteractive
3641
RUN \
3742
apt update && apt upgrade -y && apt install -y \
3843
libgtk2.0-dev \
3944
libgtk-3-dev \
45+
nlohmann-json3-dev \
4046
qt5-default
4147

42-
ENV DOCKER_BUILD=TRUE
43-
4448
USER builder
4549
WORKDIR /home/builder
50+
RUN \
51+
git clone \
52+
--branch 1-alpha-20240109-1 \
53+
--depth 1 \
54+
https://github.com/linuxdeploy/linuxdeploy-plugin-qt \
55+
--recurse-submodules && \
56+
cd linuxdeploy-plugin-qt && \
57+
cmake . \
58+
-G Ninja \
59+
-DBUILD_GMOCK=OFF \
60+
-DBUILD_TESTING=OFF \
61+
-DINSTALL_GTEST=OFF \
62+
-DCMAKE_INSTALL_PREFIX=$HOME/.local && \
63+
ninja && ninja install && \
64+
cd .. && rm -rf linuxdeploy-plugin-qt
65+
66+
ENV DOCKER_BUILD=TRUE
67+
68+
USER root
69+
WORKDIR /
70+
ADD entrypoint.sh /entrypoint.sh
71+
ENTRYPOINT ["/entrypoint.sh"]
4672

47-
CMD ["/bin/bash","-l"]

entrypoint.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
3+
OLDPWD=$PWD
4+
5+
if [ -z "HOSTUID" ]; then
6+
echo "HOSTUID is not set."
7+
exit 1
8+
fi
9+
10+
if [ -z "$1" ]; then
11+
echo "One argument required -- the name of a script to run."
12+
exit 1
13+
fi
14+
15+
usermod -u $HOSTUID builder
16+
su builder -c "PATH=/home/builder/.local/bin:$PATH && cd $OLDPWD && $1"

0 commit comments

Comments
 (0)