-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
57 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ app.onefile-build/ | |
protodesk | ||
.DirIcon | ||
*.AppImage | ||
Dockerfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,39 @@ | ||
FROM python:3.12-bullseye | ||
|
||
ARG APP_VERSION | ||
ARG ARCH | ||
# ENV APP_VERSION=${APP_VERSION} | ||
# ENV ARCH=${ARCH} | ||
|
||
WORKDIR /app | ||
|
||
RUN apt-get update && apt-get install -y patchelf | ||
RUN apt-get update && apt-get install -y patchelf desktop-file-utils libfuse2 | ||
|
||
COPY . /app | ||
|
||
# create and activate a virtual environment | ||
RUN python -m venv .venv && chmod +x .venv/bin/activate && .venv/bin/activate | ||
|
||
# install project dependencies | ||
RUN pip3 install -r requirements.txt | ||
RUN pip install -r requirements.txt | ||
|
||
# build the app with Nuitka | ||
RUN nuitka --enable-plugin=pyside6 --include-data-dir=./assets=./assets --standalone --onefile --lto=yes --output-filename=protodesk app.py | ||
|
||
# prepare AppImage directory | ||
RUN mkdir -p app.AppDir/usr/bin | ||
RUN cp protodesk app.AppDir/usr/bin/ | ||
RUN cp assets/logo.png app.AppDir/protodesk.png | ||
|
||
# set up appimagetool | ||
RUN bash -c "\ | ||
if [ "$(uname -m)" == "x86_64" ]; then \ | ||
wget https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage -O appimagetool; \ | ||
elif [ "$(uname -m)" == "aarch64" ]; then \ | ||
wget https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-aarch64.AppImage -O appimagetool; \ | ||
fi && \ | ||
chmod +x appimagetool \ | ||
" | ||
|
||
# build the AppImage | ||
RUN ./appimagetool app.AppDir Protodesk-${APP_VERSION}-${ARCH}.AppImage |