Skip to content

Slim down the main Docker image build#4753

Merged
soulgalore merged 1 commit into
mainfrom
dockerfile-cleanup
May 18, 2026
Merged

Slim down the main Docker image build#4753
soulgalore merged 1 commit into
mainfrom
dockerfile-cleanup

Conversation

@soulgalore
Copy link
Copy Markdown
Member

The apt step installed recommended packages and left /var/lib/apt/lists
in the image, both inflating the final size for no runtime benefit. The
node_modules cleanup for selenium-webdriver lived in its own RUN, which
means the deleted bytes still shipped in the earlier npm install layer.
And npm install was used despite a shrinkwrap being present, so the
install was not lockfile-strict and could drift from the committed
versions.

Switching to npm ci, --no-install-recommends + apt list cleanup, and
folding the selenium-webdriver/bin removal into the install layer
shrinks the image and makes the dependency install reproducible.

Co-authored-by: Claude noreply@anthropic.com

  The apt step installed recommended packages and left /var/lib/apt/lists
  in the image, both inflating the final size for no runtime benefit. The
  node_modules cleanup for selenium-webdriver lived in its own RUN, which
  means the deleted bytes still shipped in the earlier npm install layer.
  And npm install was used despite a shrinkwrap being present, so the
  install was not lockfile-strict and could drift from the committed
  versions.

  Switching to npm ci, --no-install-recommends + apt list cleanup, and
  folding the selenium-webdriver/bin removal into the install layer
  shrinks the image and makes the dependency install reproducible.

  Co-authored-by: Claude noreply@anthropic.com
@soulgalore soulgalore merged commit 8809092 into main May 18, 2026
15 checks passed
@soulgalore soulgalore deleted the dockerfile-cleanup branch May 18, 2026 05:04
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.

1 participant