node-python: thêm build-essential (make, g++) cho node-gyp / pip build module native
node-python image / build (amd64) (push) Successful in 1m11s
node-python image / build (arm64) (push) Successful in 1m6s
node-python image / amend-manifest (push) Successful in 10s

Image node-python có python3 nhưng thiếu make/g++, nên module Node có phần native
(vd better-sqlite3) không biên dịch được khi không tải được prebuilt.
Đã thử: docker build OK; trong image, npm ci của tl-noti build better-sqlite3 từ
nguồn thành công, 55/55 test pass.
This commit is contained in:
claudecode Bot committed 2026-11-18 08:57:08 +07:00
1 parent c641ef3600
commit 751de78f76
2 files changed
+6 -2

No files matched your search

+2 -1
View File
@@ -18,7 +18,8 @@ Kho lưu trữ này cung cấp các Docker base image cho nhiều mục đích s
- Các gói/phần mềm đã cài đặt: - Các gói/phần mềm đã cài đặt:
- **Node.js** kèm theo **npm** và **yarn** - **Node.js** kèm theo **npm** và **yarn**
- **git** - **git**
- **python v3.11** - **python v3**
- **build-essential** (make, g++) — cho node-gyp / pip build module native
- **node-go** - **node-go**
- `git.thuanle.me/public/node-go:latest` - `git.thuanle.me/public/node-go:latest`
+4 -1
View File
@@ -2,11 +2,14 @@ FROM node:lts-slim
ENV DEBIAN_FRONTEND=noninteractive ENV DEBIAN_FRONTEND=noninteractive
# Cài git + Python 3.11 (Debian stable) # Cài git + Python 3 (Debian stable) + build-essential (make, g++):
# node-gyp (module Node có phần native, vd better-sqlite3) và pip build wheel C
# cần trình biên dịch khi không tải được bản build sẵn.
RUN set -eux; \ RUN set -eux; \
apt-get update; \ apt-get update; \
apt-get install -y --no-install-recommends \ apt-get install -y --no-install-recommends \
git \ git \
build-essential \
python3 python3-pip python3-venv; \ python3 python3-pip python3-venv; \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*