You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: skills/docker-development/references/ci-testing.md
+27Lines changed: 27 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -178,3 +178,30 @@ When smoke/boot-testing an image by hand (not in the CI matrix):
178
178
- **Foreground apps that log to a file leave `docker logs` empty.** E.g. Tomcat started with `-fg` writes to `logs/catalina.out`, not stdout — an empty `docker logs` does *not* mean "nothing happened". Read the in-container log files (`docker exec <c> sh -c 'tail -n 80 .../catalina.out'`), and check the process and state (`docker inspect -f '{{.State.Status}} {{.State.ExitCode}}' <c>`).
179
179
- **Minimal/distroless images have no shell.** `docker exec … sh`/`tail`/`pgrep` won't exist on `scratch`/distroless runtimes — probe with host-side `curl` against a published port, `docker inspect` for state, or a debug sidecar (`docker run --rm --pid container:<c> busybox …`).
180
180
- **Grep for real failure signals, not benign noise.** After a bundled-dependency swap, scan logs for `NoSuchMethodError|AbstractMethodError|LinkageError|IncompatibleClassChangeError` (binary incompatibility) — not bare `ClassNotFoundException`, which OSGi/plugin frameworks emit normally.
181
+
182
+
## hadolint in CI: floating `latest` is a feature — fix findings, don't pin
183
+
184
+
CI lint jobs typically run `hadolint/hadolint:latest-alpine`. A hadolint
185
+
release can turn a previously-quiet rule into a failure overnight, so an
186
+
unrelated MR (a Renovate version bump, a docs change) suddenly goes red.
187
+
188
+
Diagnose before blaming the diff: if the default branch's last green run
189
+
predates the failure and re-running it fails identically, the linter moved,
190
+
not your change.
191
+
192
+
Policy: treat the new finding as surfaced debt and fix it in the same MR —
193
+
do not pin the hadolint image and do not add an ignore. Pinning hides every
194
+
future rule improvement; the debt only grows.
195
+
196
+
Concrete case (2026-08-13, `docker/node-red`): a hadolint update started
197
+
failing `DL3066` (non-numeric user-id) on `USER root` / `USER node-red`.
198
+
Fix: use the numeric ids the image already establishes —
199
+
200
+
```dockerfile
201
+
USER 0
202
+
RUN apk add --no-cache shadow && usermod -u 10458 node-red && apk del shadow
203
+
USER 10458
204
+
```
205
+
206
+
No behavior change, and the id survives environments that cannot resolve
0 commit comments