Commit e8b7ddc
authored
fix(docker): install node-gyp toolchain in build stage for blocked prebuilt downloads (#2148)
better-sqlite3 installs via `prebuild-install || node-gyp rebuild`. The
prebuilt binary is fetched from GitHub Releases, which corporate proxies
and offline mirrors commonly block. The fallback then compiles from
source and dies in node:22-slim because no compiler toolchain is
present. Install python3/make/g++ in the deps stage only; the runtime
image starts from a fresh node:22-slim and is unaffected.
Also documents the same failure mode in the Node.js deployment guide and
clarifies that the guide's Dockerfile (single site) and the repo-root
Dockerfile (monorepo) are different scenarios.
Follow-up to #2132 (#2118).1 parent e2c7549 commit e8b7ddc
2 files changed
Lines changed: 34 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
9 | 19 | | |
10 | 20 | | |
11 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
120 | 144 | | |
121 | 145 | | |
122 | 146 | | |
| |||
0 commit comments