Skip to content

PERF: Reduce compressed base image size by ~25MB (~2%) - #1116

Merged
davidtaylorhq merged 1 commit into
mainfrom
reduce-base-image-size
Oct 6, 2026
Merged

davidtaylorhq merged 1 commit into
mainfrom
reduce-base-image-size

Conversation

@davidtaylorhq

@davidtaylorhq davidtaylorhq commented Aug 19, 2026 •

Copy link
Copy Markdown
Member
  • ~19MB - Mount tmpfs when installing nginx. Matches other apt steps in the docker file

  • Same for postgres/redis, so that the 19MB doesn't move to their layer

  • ~6MB - Mount tmpfs over /root/.cache when installing pups. gem fetch downloads the whole RubyGems spec index

  • Pass --package-import-method hardlink to pnpm install. This does not change the size of our CI builds, which already hardlink. But it stops pnpm using reflinks on supported filesystems (btrfs, XFS, OrbStack). If reflinks are used, they are lost during the packaging process, so we silently double the cost of node_modules. On OrbStack this saves ~115MB.

@ZogStriP ZogStriP left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🗜️

@davidtaylorhq
davidtaylorhq marked this pull request as draft August 20, 2026 08:24
- ~19MB - Mount tmpfs when installing nginx. Matches other apt steps in the docker file

- Same for postgres/redis, so that the 19MB doesn't move to their layer

- ~6MB - Mount tmpfs over /root/.cache when installing pups. `gem fetch` downloads the whole RubyGems spec index

- Pass `--package-import-method hardlink` to pnpm install. This does not change the size of our CI builds, which already hardlink. But it stops pnpm using reflinks on supported filesystems (btrfs, XFS, OrbStack). If reflinks are used, they are lost during the packaging process, so we silently double the cost of node_modules. On OrbStack this saves ~115MB.
@davidtaylorhq
davidtaylorhq force-pushed the reduce-base-image-size branch from b16c3a8 to 070aba9 Compare October 6, 2026 16:24
@davidtaylorhq davidtaylorhq changed the title PERF: Reduce compressed base image size by ~68MB (~5%) PERF: Reduce compressed base image size by ~25MB (~2%) Oct 6, 2026
@davidtaylorhq
davidtaylorhq marked this pull request as ready for review October 6, 2026 16:24
@davidtaylorhq
davidtaylorhq merged commit ac99052 into main Oct 6, 2026
11 checks passed
@davidtaylorhq
davidtaylorhq deleted the reduce-base-image-size branch October 6, 2026 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants