Skip to content

Revert "build(docker): Switch to Docker Hardened Images (DHI)"#213

Merged
oioki merged 1 commit intomasterfrom
revert-212-build/switch-to-dhi-base-images
Mar 2, 2026
Merged

Revert "build(docker): Switch to Docker Hardened Images (DHI)"#213
oioki merged 1 commit intomasterfrom
revert-212-build/switch-to-dhi-base-images

Conversation

@oioki
Copy link
Member

@oioki oioki commented Mar 2, 2026

Reverts #212

as this breaks acceptance tests:
https://github.com/getsentry/sentry/actions/runs/22585881666/job/65430559555

Container chartcuterie did not become healthy within 120 seconds.

@oioki oioki merged commit cd6beb8 into master Mar 2, 2026
12 checks passed
@oioki oioki deleted the revert-212-build/switch-to-dhi-base-images branch March 2, 2026 17:27
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.


WORKDIR /build

COPY package.json yarn.lock ./
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing WORKDIR causes massive image bloat via symlink

Medium Severity

The builder stage has no WORKDIR, so the default / is used. The tsc build outputs to ./lib, which resolves to /lib — a symlink to /usr/lib on Debian bookworm (usrmerge). Docker's COPY --from=builder lib lib follows symlinks, so it copies the entire /usr/lib directory (system libraries + build output) into the runtime image. The removed DHI version had WORKDIR /build to avoid this. Adding a WORKDIR to the builder stage would prevent copying hundreds of megabytes of unnecessary system libraries.

Additional Locations (1)

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants