chore(docker): set up tooling for building better-sqlite3 from scratch

This commit is contained in:
Elian Doran
2026-04-13 01:06:34 +03:00
parent 4c02d70dae
commit f9aaccdfe2
5 changed files with 30 additions and 0 deletions

View File

@@ -1,6 +1,14 @@
FROM node:24.14.1-bullseye-slim AS builder
RUN corepack enable
# Install build tools required to compile native addons (e.g. better-sqlite3) on ARM
RUN apt-get update && \
apt-get install -y --no-install-recommends \
python3 \
make \
g++ && \
rm -rf /var/lib/apt/lists/*
# Install native dependencies since we might be building cross-platform.
WORKDIR /usr/src/app/build
COPY ./docker/package.json ./docker/pnpm-workspace.yaml /usr/src/app/

View File

@@ -1,6 +1,9 @@
FROM node:24.14.1-alpine AS builder
RUN corepack enable
# Install build tools required to compile native addons (e.g. better-sqlite3) on ARM
RUN apk add --no-cache python3 make g++
# Install native dependencies since we might be building cross-platform.
WORKDIR /usr/src/app
COPY ./docker/package.json ./docker/pnpm-workspace.yaml /usr/src/app/

View File

@@ -1,6 +1,9 @@
FROM node:24.14.1-alpine AS builder
RUN corepack enable
# Install build tools required to compile native addons (e.g. better-sqlite3) on ARM
RUN apk add --no-cache python3 make g++
# Install native dependencies since we might be building cross-platform.
WORKDIR /usr/src/app
COPY ./docker/package.json ./docker/pnpm-workspace.yaml /usr/src/app/

View File

@@ -1,6 +1,14 @@
FROM node:22.21.0-bullseye-slim AS builder
RUN corepack enable
# Install build tools required to compile native addons (e.g. better-sqlite3) on ARM
RUN apt-get update && \
apt-get install -y --no-install-recommends \
python3 \
make \
g++ && \
rm -rf /var/lib/apt/lists/*
# Install native dependencies since we might be building cross-platform.
WORKDIR /usr/src/app/build
COPY ./docker/package.json ./docker/pnpm-workspace.yaml /usr/src/app/

View File

@@ -1,6 +1,14 @@
FROM node:24.14.1-bullseye-slim AS builder
RUN corepack enable
# Install build tools required to compile native addons (e.g. better-sqlite3) on ARM
RUN apt-get update && \
apt-get install -y --no-install-recommends \
python3 \
make \
g++ && \
rm -rf /var/lib/apt/lists/*
# Install native dependencies since we might be building cross-platform.
WORKDIR /usr/src/app/build
COPY ./docker/package.json ./docker/pnpm-workspace.yaml /usr/src/app/