Commit 0e01dde
fix(docker): install pg and mysql2 in the official runtime image, and pin the published driver list to it (#14699)
* fix(docker): install pg and mysql2 in the official runtime image
`@objectstack/driver-sql` declares `pg`, `mysql2` and `tedious` as OPTIONAL
peer dependencies, and npm skips optional peers, so the official runtime
image -- built by `npm install -g @objectstack/cli` and nothing else -- had
no `pg` in it. Every documented Postgres path landed on that image: the
`docker run ... -e OS_DATABASE_URL=postgres://...` invocation in
docker/README.md, the same invocation in this Dockerfile's own header, and
`npm create objectstack` followed by `docker compose up` against the
generated `postgres:17` service. All of them failed fast at boot with
`Cannot find module 'pg'`.
Per the maintainer ruling on #14510 (direction B'): the image installs the
drivers, and docker/README.md publishes which ones it carries as a
maintained public promise. The scaffolder is unchanged.
The version ranges are copied verbatim from driver-sql's
`peerDependencies`, so the image satisfies the driver's own contract rather
than a second one; both packages are pure JavaScript with no native build.
A promise with nothing holding it to the artifact drifts silently, so
`check-docs-image-tag` -- the gate that already owns exactly this file pair
-- grows a third limb comparing the Dockerfile's install line against the
README's published table: package set, version ranges, and an anti-vacuity
rule on both sides. Every new finding kind is observed failing in
`--self-test` (94 assertions), and the limb was proven red against the
pre-change tree before the docker files were touched.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016yfqQh2dBgPAymYd7xipza
* docs(docker): correct the image's 'and nothing else' contents claim
The README opened by saying the image packages the CLI 'and nothing else',
which the driver install one commit earlier makes false. Both the README
and the Dockerfile header now name what is actually inside.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016yfqQh2dBgPAymYd7xipza
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent a8fac3a commit 0e01dde
3 files changed
Lines changed: 651 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
44 | 73 | | |
45 | 74 | | |
46 | 75 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
49 | 87 | | |
50 | 88 | | |
51 | 89 | | |
| |||
0 commit comments