Skip to content

chore(stacklet): slim the image and refresh Python, Chromium and Debian - #14

Merged
jtroup merged 1 commit into
stacklet/integrationfrom
elmo/hardly-fancy-lynx
Oct 26, 2026
Merged

jtroup merged 1 commit into
stacklet/integrationfrom
elmo/hardly-fancy-lynx

Conversation

@jtroup

@jtroup jtroup commented Oct 26, 2026 •

Copy link
Copy Markdown

ENG-9445

what

In the stacklet image target:

  • Move the Python base image to 3.11.17.
  • Update Playwright to 1.64.1. Install only the Chromium headless shell
    and the system packages that Chromium needs.
  • Add a final layer that removes the build-only -dev packages, runs
    apt-get upgrade and autoremove, and uninstalls uv, wheel and
    setuptools from the system Python.

The image drops from 2.62 GB to 1.73 GB.

why

The image carried software that it never uses. Playwright installed
the full Chromium beside the headless shell, plus the system packages
for WebKit and Firefox. The -dev packages from the upstream
build stages stayed in the final image. The venv native extensions link
only libc, libgcc, libstdc++ and zlib, and psycopg2-binary bundles its
own client libraries. Removing these packages and upgrading the rest
keeps the image smaller and its packages current.

testing

I built the amd64 image locally. In that image, the headless shell
takes a screenshot through Playwright and psycopg2 imports.

  • Stacklet platform functional suite against a local amd64 build of
    this branch

docs

No docs needed.


🤖 Generated with Claude Code

@jtroup
jtroup requested a review from a team as a code owner October 26, 2026 03:53
Comment thread Dockerfile
Comment on lines +328 to +332
# Remove build-only packages. The venv's native extensions link only libc,
# libgcc, libstdc++ and zlib (psycopg2-binary bundles its client libraries),
# and the system Python's uv, wheel and setuptools are only used at build time.
# apt-get upgrade picks up Debian updates newer than the base image. This layer
# follows the SUPERSET_* ARGs, so it reruns on every build.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Worth trying to have a build-only layer later?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Yep, good idea - will file a ticket to track. Thanks

@jtroup
jtroup merged commit b993e0c into stacklet/integration Oct 26, 2026
2 checks passed
@jtroup
jtroup deleted the elmo/hardly-fancy-lynx branch October 26, 2026 17:35
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