-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
1 parent
02d8488
commit f191832
Showing
3 changed files
with
48 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
FROM arm32v7/python:3.9-bullseye | ||
|
||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
build-essential libssl-dev libffi-dev wget tar python3.9-dev patchelf upx-ucl \ | ||
&& python3.9 -m pip install nuitka | ||
|
||
WORKDIR /app | ||
COPY downloader /app/downloader/ | ||
COPY __main__.py commit.py /app/ | ||
|
||
ENV CFLAGS="-Os -march=armv7-a" | ||
RUN nuitka --lto=no --follow-imports \ | ||
--remove-output \ | ||
--include-module=_json \ | ||
--python-flag=no_site \ | ||
--python-flag=-OO \ | ||
--jobs=$(nproc) \ | ||
--include-package=downloader __main__.py | ||
|
||
RUN upx --best __main__.bin | ||
|
||
CMD ["cat", "__main__.bin"] |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/env bash | ||
# Copyright (c) 2021-2022 José Manuel Barroso Galindo <[email protected]> | ||
|
||
set -euo pipefail | ||
|
||
cd src | ||
|
||
echo "default_commit = '$(git rev-parse --short HEAD)'" > "commit.py" | ||
docker build --platform=linux/arm/v7 -t downloader-nuitka . > /dev/null | ||
docker run --platform linux/arm/v7 downloader-nuitka |
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