-
Notifications
You must be signed in to change notification settings - Fork 24
build(dgw): add ARM64 Docker image support #1607
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Adds native ARM64 Docker images for Devolutions Gateway, enabling deployment on ARM-based devices like Raspberry Pi and AWS Graviton instances with full native performance. Multi-arch manifests automatically select the correct image for the user's platform.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds native ARM64 Docker image support for Devolutions Gateway, enabling deployment on ARM-based systems like Raspberry Pi and AWS Graviton with full native performance. The implementation uses Docker Buildx and QEMU to build multi-architecture images with automatic platform selection via manifest lists.
Key Changes:
- Modified Dockerfile to conditionally install PowerShell for ARM64 from GitHub releases (Microsoft's APT repository lacks ARM64 support)
- Refactored release workflow to prepare separate build contexts for AMD64 and ARM64 architectures with appropriate binaries and native libraries
- Reorganized native library structure to explicitly separate platform and architecture variants (native-libs/{platform}/{arch}/)
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| package/Linux/Dockerfile | Added conditional PowerShell installation logic to support both AMD64 (via APT) and ARM64 (via GitHub releases) architectures |
| .github/workflows/release.yml | Refactored container build process to create separate build contexts for AMD64 and ARM64, build architecture-specific images, and create multi-arch manifests |
| .github/workflows/package.yml | Extended Cadeau native library downloads to include ARM64 and reorganized storage structure by platform and architecture |
| .github/workflows/README.md | Added documentation explaining the multi-architecture Docker image build strategy |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| Copy-Item -Path "docker/Linux/Dockerfile" -Destination $PkgDir | ||
| Copy-Item -Path "docker/Linux/entrypoint.ps1" -Destination $PkgDir |
Copilot
AI
Dec 5, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incorrect path to Dockerfile and entrypoint.ps1. The 'docker' artifact uploaded in package.yml contains files at package/Linux/Dockerfile and package/Linux/entrypoint.ps1, which when downloaded will be at docker/package/Linux/Dockerfile and docker/package/Linux/entrypoint.ps1, not docker/Linux/Dockerfile. This path should be "docker/package/Linux/Dockerfile" and "docker/package/Linux/entrypoint.ps1".
| Copy-Item -Path "docker/Linux/Dockerfile" -Destination $PkgDir | |
| Copy-Item -Path "docker/Linux/entrypoint.ps1" -Destination $PkgDir | |
| Copy-Item -Path "docker/package/Linux/Dockerfile" -Destination $PkgDir | |
| Copy-Item -Path "docker/package/Linux/entrypoint.ps1" -Destination $PkgDir |
| && apt-get install -y --no-install-recommends wget ca-certificates openssl \ | ||
| && ARCH=$(dpkg --print-architecture) \ | ||
| && if [ "$ARCH" = "arm64" ]; then \ | ||
| PWSH_VERSION=7.4.6 \ |
Copilot
AI
Dec 5, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The hardcoded PowerShell version 7.4.6 creates a maintenance burden and could lead to version drift between architectures. Consider using a variable or ARG at the top of the Dockerfile (e.g., ARG PWSH_VERSION=7.4.6) to make version updates easier and more consistent.
| docker buildx build --platform linux/amd64 ` | ||
| --tag "${ImageName}:${Version}-amd64" ` | ||
| --push ` | ||
| $Amd64Context | ||
| } else { | ||
| docker buildx build --platform linux/amd64 ` | ||
| --tag "${ImageName}:${Version}-amd64" ` | ||
| $Amd64Context | ||
| } |
Copilot
AI
Dec 5, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The docker buildx build commands lack explicit error handling. If a build fails, the script will continue to the next steps. Consider adding error checking after each docker command (e.g., if ($LASTEXITCODE -ne 0) { throw "Build failed" }) to ensure failures are caught and the workflow stops appropriately.
| docker buildx build --platform linux/arm64 ` | ||
| --tag "${ImageName}:${Version}-arm64" ` | ||
| --push ` | ||
| $Arm64Context | ||
| } else { | ||
| docker buildx build --platform linux/arm64 ` | ||
| --tag "${ImageName}:${Version}-arm64" ` | ||
| $Arm64Context | ||
| } |
Copilot
AI
Dec 5, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The docker buildx build commands lack explicit error handling. If a build fails, the script will continue to the next steps. Consider adding error checking after each docker command (e.g., if ($LASTEXITCODE -ne 0) { throw "Build failed" }) to ensure failures are caught and the workflow stops appropriately.
| Write-Host "Creating multi-arch manifest for latest..." | ||
| docker buildx imagetools create ` | ||
| --tag "${ImageName}:latest" ` | ||
| "${ImageName}:${Version}-amd64" ` | ||
| "${ImageName}:${Version}-arm64" |
Copilot
AI
Dec 5, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The docker buildx imagetools create commands lack explicit error handling. If manifest creation fails, the script will continue. Consider adding error checking after each command (e.g., if ($LASTEXITCODE -ne 0) { throw "Manifest creation failed" }) to ensure failures are caught and the workflow stops appropriately.
| Write-Host "Creating multi-arch manifest for latest..." | |
| docker buildx imagetools create ` | |
| --tag "${ImageName}:latest" ` | |
| "${ImageName}:${Version}-amd64" ` | |
| "${ImageName}:${Version}-arm64" | |
| if ($LASTEXITCODE -ne 0) { throw "Manifest creation for version ${Version} failed" } | |
| Write-Host "Creating multi-arch manifest for latest..." | |
| docker buildx imagetools create ` | |
| --tag "${ImageName}:latest" ` | |
| "${ImageName}:${Version}-arm64" | |
| if ($LASTEXITCODE -ne 0) { throw "Manifest creation for latest failed" } |
| Copy-Item -Path "docker/Linux/Dockerfile" -Destination $PkgDir | ||
| Copy-Item -Path "docker/Linux/entrypoint.ps1" -Destination $PkgDir |
Copilot
AI
Dec 5, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incorrect path to Dockerfile and entrypoint.ps1. The 'docker' artifact uploaded in package.yml contains files at package/Linux/Dockerfile and package/Linux/entrypoint.ps1, which when downloaded will be at docker/package/Linux/Dockerfile and docker/package/Linux/entrypoint.ps1, not docker/Linux/Dockerfile. This path should be "docker/package/Linux/Dockerfile" and "docker/package/Linux/entrypoint.ps1".
| Copy-Item -Path "docker/Linux/Dockerfile" -Destination $PkgDir | |
| Copy-Item -Path "docker/Linux/entrypoint.ps1" -Destination $PkgDir | |
| Copy-Item -Path "docker/package/Linux/Dockerfile" -Destination $PkgDir | |
| Copy-Item -Path "docker/package/Linux/entrypoint.ps1" -Destination $PkgDir |

Adds native ARM64 Docker images for Devolutions Gateway, enabling deployment on ARM-based devices like Raspberry Pi and AWS Graviton instances with full native performance. Multi-arch manifests automatically select the correct image for the user's platform.
Issue: DGW-325