Repository navigation
Conversation
lirlia
marked this pull request as ready for review
August 19, 2026 07:32
This branch has not been deployed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
better-sqlite3in a target-platform build stage for both the Debian and Alpine images.Related to #653.
Root cause
.github/workflows/build-docker.yamlrunsyarn prepare:dockeron the x86_64 GitHub Actions runner before Docker Buildx starts.prepare:dockercallsinstall:drivers:docker, which installsbetter-sqlite3and creates:for x86_64.
Buildx subsequently builds
linux/amd64,linux/arm64, andlinux/arm/v7, but the Dockerfiles only copy that already-prepared directory. ACOPYdoes not rebuild native addons, so the ARM images receive the x86-64 ELF.Reproduction
On an ARM64 host:
docker pull --platform linux/arm64 dbgate/dbgate:7.2.5 docker run --rm \ --platform linux/arm64 \ --entrypoint node \ dbgate/dbgate:7.2.5 \ -e "const Database = require('better-sqlite3'); const db = new Database(':memory:'); db.close()"This fails with
ERR_DLOPEN_FAILEDbecause the native addon has the wrong architecture.The addon can also be inspected from the image:
Before this change,
filereports an x86-64 ELF even though the image platform is ARM64.