Commit 2d63673
authored
fix(coprocessor): use npm ci for deterministic builds (#1870)
* fix(docker): use npm ci for deterministic builds
Replace `npm install` with `npm ci` in Dockerfiles to ensure
reproducible builds from the lockfile. `npm install` can modify
package-lock.json and produce non-deterministic results.
* trigger CI
* revert: npm ci breaks in isolated Docker builds
The Dockerfiles build contracts in isolation without access to the
monorepo root package-lock.json. npm ci requires the lockfile to be
present, but only host-contracts/ or gateway-contracts/ directories
are copied into the build context.
npm install is the correct choice here since it resolves dependencies
from package.json without requiring a lockfile.
* fix(docker): use npm ci with root lockfile for deterministic builds
Copy root package.json and package-lock.json into Docker build context
to enable npm ci for workspace members (host-contracts).
Changes:
- host-listener/Dockerfile: Copy root lockfile, use npm ci --workspace
- Dockerfile.workspace: Copy root lockfile for host-contracts workspace,
use npm ci directly for gateway-contracts (has own lockfile)
This ensures reproducible builds from the lockfile while respecting
the monorepo workspace structure.
* chore: remove redundant comments
* fix(docker): run npm ci from workspace root
npm workspace commands must be executed from the directory containing
the root package.json with the workspaces field, not from inside the
workspace directory.1 parent 7fb1bd7 commit 2d63673
File tree
2 files changed
+15
-7
lines changed- coprocessor/fhevm-engine
- host-listener
2 files changed
+15
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
37 | 40 | | |
38 | 41 | | |
39 | 42 | | |
40 | 43 | | |
41 | | - | |
42 | | - | |
43 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
44 | 47 | | |
45 | 48 | | |
46 | 49 | | |
| |||
50 | 53 | | |
51 | 54 | | |
52 | 55 | | |
53 | | - | |
| 56 | + | |
54 | 57 | | |
55 | 58 | | |
56 | 59 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
8 | 11 | | |
9 | 12 | | |
10 | 13 | | |
11 | | - | |
12 | | - | |
13 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
14 | 19 | | |
15 | 20 | | |
16 | 21 | | |
| |||
0 commit comments