Skip to content

feat(cli): add SUPABASE_USE_SLIM_IMAGES flag for slim ghcr images - #6382

Open
avallete wants to merge 7 commits into
developfrom
avallete/slim-images-flag
Open

feat(cli): add SUPABASE_USE_SLIM_IMAGES flag for slim ghcr images#6382
avallete wants to merge 7 commits into
developfrom
avallete/slim-images-flag

Conversation

@avallete

@avallete avallete commented Aug 28, 2026

Copy link
Copy Markdown
Member

Summary

Adds an opt-in ambient env flag SUPABASE_USE_SLIM_IMAGES (true or 1) that rewrites local-stack Docker image names from the embedded Dockerfile pins to the slim ghcr.io/supabase/cli/<service> builds.

Published slim postgres/storage/auth/edge-runtime images now match the docker.io contracts (root start, sh/wget), so the flag is an image-name rewrite rather than a second runtime. Spec builders still branch for services that remain distroless (auth/studio/pg-meta healthchecks, pooler/realtime/analytics busybox wget, Vector secretFiles). Kong, the differ/migra/pgprove job images, pg 13/14/15 fallbacks, OrioleDB, and deno_version = 1 stay on docker.io. Slim refs skip SUPABASE_INTERNAL_IMAGE_REGISTRY. With the flag unset, behavior is unchanged.

The rewrite always targets ghcr.io/supabase/cli/<service>. The stack catalog's vector/pooler mirrors (ghcr.io/supabase/{vector,supavisor}) are not used.

This is the code layer of a stack that splits the previous mixed review on #6329. Docs live in #6383.

Linked issue

Closes #

  • The linked issue is open and carries the open-for-contribution label (or I'm a Supabase maintainer).

Checklist

  • The PR title follows Conventional Commits (e.g. fix(cli): …).
  • Tests added or updated for the change.
  • From the repository root, pnpm check:all passes; relevant package tests pass for every touched workspace, and pnpm types:check passes for each touched TypeScript workspace (or workspace declaring it).

avallete and others added 2 commits August 28, 2026 18:49
When SUPABASE_USE_SLIM_IMAGES is true or 1, the legacy shell resolves
local-stack Docker images from the slim ghcr.io/supabase/cli/ builds
instead of the docker.io images pinned in the embedded Dockerfile.
Services with no slim build stay on docker.io. With the flag unset,
behavior is unchanged.

Co-authored-by: Cursor <cursoragent@cursor.com>
Published slim images now match docker.io for the services those
comments described, so they no longer claim missing migrate-call.js,
a distroless-only shell pin, or a slim-baked transform default.

Co-authored-by: Cursor <cursoragent@cursor.com>
@avallete
avallete requested a review from a team as a code owner August 28, 2026 16:51
@avallete avallete changed the title avallete/slim images flag feat(cli): add SUPABASE_USE_SLIM_IMAGES flag for slim ghcr images Aug 28, 2026
@github-actions

github-actions Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Supabase CLI preview

npx --yes https://pkg.pr.new/supabase/cli/supabase@5db428081cbfcddb992e4bbf67c4fccd566cfaaf

Preview package for commit 5db4280.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 17f9ef48fc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/cli/src/shared/services/slim-images.ts Outdated
Comment thread apps/cli/src/shared/services/slim-images.ts
Comment thread apps/cli/src/legacy/commands/start/services/gotrue.service.ts Outdated
Comment thread apps/cli-go/pkg/config/templates/Dockerfile Outdated
avallete and others added 3 commits August 28, 2026 19:01
The stack catalog maps those services to ghcr.io/supabase/{supavisor,vector},
so the flag pulled the wrong images and skipped the slim runtime forks.
Keep catalog tag normalization, then always emit ghcr.io/supabase/cli/<service>.

Co-authored-by: Cursor <cursoragent@cursor.com>
The flag-off match case hardcoded postgres 17.6.1.165 after the pin moved
to 17.6.1.166, so the test was committed red.

Co-authored-by: Cursor <cursoragent@cursor.com>
Slim Vector ships sh and wget, so both families share the heredoc entrypoint.
Drop leftover tests that only restated the shared docker.io spec.

Co-authored-by: Cursor <cursoragent@cursor.com>
Comment thread apps/cli-go/pkg/config/templates/Dockerfile Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 86ba7c4c66

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/cli-go/pkg/config/templates/Dockerfile Outdated
Comment thread apps/cli/src/legacy/commands/start/start.slim-images.e2e.test.ts
avallete and others added 2 commits August 29, 2026 12:16
Auth, studio, and pg-meta now share docker.io healthchecks after the
latest slim images. Elixir probes stay on PATH wget; analytics keeps
the image entrypoint because the binary lives at /app/bin/logflare.

Co-authored-by: Cursor <cursoragent@cursor.com>
…moval

Co-authored-by: Cursor <cursoragent@cursor.com>
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