Skip to content

fix(docker): switch builder to node:20 to resolve native module compilation failure - #3

Merged
mesayanroy merged 2 commits into
mainfrom
copilot/fix-ci-docker-build-images
Mar 10, 2026
Merged

fix(docker): switch builder to node:20 to resolve native module compilation failure#3
mesayanroy merged 2 commits into
mainfrom
copilot/fix-ci-docker-build-images

Conversation

Copilot AI commented Mar 10, 2026

Copy link
Copy Markdown
Contributor

Docker — Build Images was failing because @solana/wallet-adapter-wallets pulls in hardware wallet adapters (e.g. Ledger) that depend on the usb native module, which requires Python3/make/g++ — none of which exist in node:20-alpine.

Changes

  • Builder base image: node:20-alpinenode:20 (Debian-based) in both Dockerfile.frontend and Dockerfile.backend. The full node:20 image ships with the complete build toolchain needed for native module compilation via node-gyp. Runner stages remain node:20-alpine.
  • Reproducible installs: Added COPY package-lock.json and switched builder installs from npm install to npm ci to lock dependency resolution.
# Before
FROM node:20-alpine AS builder
COPY package.json ./
RUN npm install --workspace=frontend

# After
FROM node:20 AS builder
COPY package.json package-lock.json ./
RUN npm ci --workspace=frontend

# Runner stays lean
FROM node:20-alpine AS runner

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…lure

- Switch builder base images from node:20-alpine to node:20 (Debian)
  so that native modules (e.g. usb via @solana/wallet-adapter-wallets)
  compile without extra toolchain installation steps
- Add COPY package-lock.json and use npm ci for reproducible builds
- Runner stages remain node:20-alpine (lean final images)

Fixes: Docker — Build Images CI failure

Co-authored-by: mesayanroy <169074736+mesayanroy@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix CI Docker build images for production readiness fix(docker): switch builder to node:20 to resolve native module compilation failure Mar 10, 2026
@mesayanroy
mesayanroy marked this pull request as ready for review March 10, 2026 18:53
@mesayanroy
mesayanroy merged commit ced3a37 into main Mar 10, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants