feat(docker): add linux-arm64 reproducible build target

Cross-published via the existing x64 desktop image (self-contained
publish doesn't need ARM hardware), for Raspberry Pi and other
64-bit ARM boards.
This commit is contained in:
2026-07-26 11:05:16 +02:00
parent 0d541d0fe3
commit 8ac4a05c44
2 changed files with 54 additions and 22 deletions
+15 -3
View File
@@ -74,8 +74,9 @@ Running without arguments shows an interactive menu — pick a single target or
Targets:
windows Win x64 single-file executable (native libs embedded)
linux Linux x64 single-file binary (runs as-is, nothing to install)
linux-arm64 Linux ARM64 single-file binary (runs as-is, nothing to install)
android Android APK (release-signed, prompts for keystore passwords)
all All three targets
all All targets above
Options:
--rebuild Force rebuild of the Docker images (needed after editing a Dockerfile)
@@ -86,6 +87,7 @@ Examples:
```bash
./docker/build.sh all # build everything
./docker/build.sh windows # Windows only
./docker/build.sh linux-arm64 # Linux ARM64 only
./docker/build.sh android --rebuild # Android, rebuilding the image first
```
@@ -97,9 +99,10 @@ All artifacts land in `dist/` at the repository root. The version number is
read automatically from `<Version>` in `src/App/PalladiumWallet.App.csproj`.
| Target | Path |
|---------|--------------------------------------------------|
|-------------|-----------------------------------------------------------|
| Windows | `dist/windows/PalladiumWallet-{ver}-win-x64.exe` |
| Linux | `dist/linux/PalladiumWallet-{ver}-linux-x64` |
| Linux ARM64 | `dist/linux-arm64/PalladiumWallet-{ver}-linux-arm64` |
| Android | `dist/android/PalladiumWallet-{ver}.apk` |
**Windows** — a single self-contained `.exe` (runtime and native libraries
@@ -119,6 +122,15 @@ effectively all of them); no .NET or other packages to install. If you
transfer it through a channel that strips permissions (e.g. a web download),
restore the execute bit with `chmod +x`.
**Linux ARM64** — same as above, cross-published for `aarch64` (e.g.
Raspberry Pi 4/5, ARM-based SBCs/laptops running a 64-bit distro). The build
runs on an x64 Docker host — .NET's self-contained publish cross-targets
`linux-arm64` without needing ARM hardware. Run it the same way:
```bash
./PalladiumWallet-{ver}-linux-arm64
```
**Android** — a release-signed APK for sideloading: transfer it to the phone
and open it (enable "install from unknown sources" if prompted), or install
via `adb install dist/android/PalladiumWallet-*.apk`. Supports Android 6.0+
@@ -138,7 +150,7 @@ via `adb install dist/android/PalladiumWallet-*.apk`. Supports Android 6.0+
| Image | Dockerfile | Used for | Size |
|---------------------|----------------------|-----------------|---------|
| `plm-build-desktop` | `Dockerfile.desktop` | windows + linux | ~1.5 GB |
| `plm-build-desktop` | `Dockerfile.desktop` | windows + linux + linux-arm64 | ~1.5 GB |
| `plm-build-android` | `Dockerfile.android` | android | ~5 GB |
Images are built automatically the first time a target needs them and reused
+24 -4
View File
@@ -29,8 +29,9 @@ $(bold "Usage:") $(basename "$0") [TARGET] [OPTIONS]
$(bold "Targets:")
windows Win x64 single-file executable → dist/windows/
linux Linux x64 single-file binary → dist/linux/
linux-arm64 Linux ARM64 single-file binary → dist/linux-arm64/
android Android APK (release-signed) → dist/android/
all All three targets
all All targets above
$(bold "Options:")
--rebuild Force rebuild of Docker images (e.g. after Dockerfile change)
@@ -50,7 +51,7 @@ TARGET=""
for arg in "$@"; do
case "$arg" in
windows|linux|android|all) TARGET="$arg" ;;
windows|linux|linux-arm64|android|all) TARGET="$arg" ;;
--rebuild) REBUILD=true ;;
-h|--help) usage; exit 0 ;;
*) err "Unknown argument: $arg"; usage; exit 1 ;;
@@ -62,10 +63,10 @@ if [[ -z "$TARGET" ]]; then
bold "PalladiumWallet — reproducible build"
echo ""
PS3="Select target: "
options=("windows" "linux" "android" "all" "quit")
options=("windows" "linux" "linux-arm64" "android" "all" "quit")
select opt in "${options[@]}"; do
case "$opt" in
windows|linux|android|all) TARGET="$opt"; break ;;
windows|linux|linux-arm64|android|all) TARGET="$opt"; break ;;
quit) echo "Aborted."; exit 0 ;;
*) echo "Invalid choice, try again." ;;
esac
@@ -172,6 +173,23 @@ build_linux() {
ok "Linux → dist/linux/PalladiumWallet-${VERSION}-linux-x64"
}
build_linux_arm64() {
ensure_desktop_image
info "Building Linux ARM64 …"
run_build "$IMAGE_DESKTOP" \
"dotnet publish src/App.Desktop \
-r linux-arm64 \
-c Release \
-p:PublishSingleFile=true \
-p:IncludeNativeLibrariesForSelfExtract=true \
--self-contained \
-o /tmp/linux-arm64-out
install -m 755 /tmp/linux-arm64-out/PalladiumWallet \
\"/output/PalladiumWallet-${VERSION}-linux-arm64\"" \
"${DIST_DIR}/linux-arm64"
ok "Linux ARM64 → dist/linux-arm64/PalladiumWallet-${VERSION}-linux-arm64"
}
build_android() {
ensure_android_image
@@ -223,10 +241,12 @@ START=$(date +%s)
case "$TARGET" in
windows) build_windows ;;
linux) build_linux ;;
linux-arm64) build_linux_arm64 ;;
android) build_android ;;
all)
build_windows
build_linux
build_linux_arm64
build_android
;;
esac