Skip to content

Conversation

@CBenoit
Copy link
Member

@CBenoit CBenoit commented Dec 5, 2025

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

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.
@CBenoit CBenoit requested review from a team as code owners December 5, 2025 16:08
@CBenoit CBenoit changed the title feat(dgw): add ARM64 Docker image support build(dgw): add ARM64 Docker image support Dec 5, 2025
@CBenoit CBenoit enabled auto-merge (squash) December 5, 2025 16:08
@CBenoit
Copy link
Member Author

CBenoit commented Dec 5, 2025

I got the dry run to work 🟢

image

@CBenoit CBenoit disabled auto-merge December 5, 2025 23:50
@CBenoit CBenoit enabled auto-merge (squash) December 5, 2025 23:50
@CBenoit CBenoit requested a review from Copilot December 5, 2025 23:50
Copy link
Contributor

Copilot AI left a 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.

Comment on lines +222 to +223
Copy-Item -Path "docker/Linux/Dockerfile" -Destination $PkgDir
Copy-Item -Path "docker/Linux/entrypoint.ps1" -Destination $PkgDir
Copy link

Copilot AI Dec 5, 2025

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".

Suggested change
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

Copilot uses AI. Check for mistakes.
&& apt-get install -y --no-install-recommends wget ca-certificates openssl \
&& ARCH=$(dpkg --print-architecture) \
&& if [ "$ARCH" = "arm64" ]; then \
PWSH_VERSION=7.4.6 \
Copy link

Copilot AI Dec 5, 2025

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.

Copilot uses AI. Check for mistakes.
Comment on lines +278 to +286
docker buildx build --platform linux/amd64 `
--tag "${ImageName}:${Version}-amd64" `
--push `
$Amd64Context
} else {
docker buildx build --platform linux/amd64 `
--tag "${ImageName}:${Version}-amd64" `
$Amd64Context
}
Copy link

Copilot AI Dec 5, 2025

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.

Copilot uses AI. Check for mistakes.
Comment on lines +291 to +299
docker buildx build --platform linux/arm64 `
--tag "${ImageName}:${Version}-arm64" `
--push `
$Arm64Context
} else {
docker buildx build --platform linux/arm64 `
--tag "${ImageName}:${Version}-arm64" `
$Arm64Context
}
Copy link

Copilot AI Dec 5, 2025

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.

Copilot uses AI. Check for mistakes.
Comment on lines +309 to +314
Write-Host "Creating multi-arch manifest for latest..."
docker buildx imagetools create `
--tag "${ImageName}:latest" `
"${ImageName}:${Version}-amd64" `
"${ImageName}:${Version}-arm64"
Copy link

Copilot AI Dec 5, 2025

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.

Suggested change
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" }

Copilot uses AI. Check for mistakes.
Comment on lines +176 to +177
Copy-Item -Path "docker/Linux/Dockerfile" -Destination $PkgDir
Copy-Item -Path "docker/Linux/entrypoint.ps1" -Destination $PkgDir
Copy link

Copilot AI Dec 5, 2025

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".

Suggested change
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

Copilot uses AI. Check for mistakes.
@CBenoit CBenoit merged commit b2f5172 into master Dec 6, 2025
95 of 101 checks passed
@CBenoit CBenoit deleted the ci/multi-arch-docker branch December 6, 2025 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants