Skip to content

feat: support custom container images via config#325

Open
gtsiolis wants to merge 1 commit into
mainfrom
devx-703-support-enterprise-environments-that-cannot-pull-from-ac7a
Open

feat: support custom container images via config#325
gtsiolis wants to merge 1 commit into
mainfrom
devx-703-support-enterprise-environments-that-cannot-pull-from-ac7a

Conversation

@gtsiolis

@gtsiolis gtsiolis commented Jun 18, 2026

Copy link
Copy Markdown
Member

What

Adds an optional per-container image field so users can override the default Docker Hub image — e.g. point at an internal registry mirror or a locally loaded offline image.

ContainerConfig.Image():

  • returns image as-is when it already carries a tag,
  • otherwise appends the configured tag (or latest),
  • falls back to the default localstack/<product>:<tag> when image is unset.

Scope

Split out of the original DEVX-703 work to keep reviews small. This PR is image override only.

The offline / slow-network handling that originally motivated this branch is tracked separately under PRO-219, so its integration tests (proving the CLI behaves correctly on slow or offline networks) don't gate this change:

  • PRO-323 — reuse local image when already present → Reuse local image when already present for pinned tags #339 (open)
  • PRO-324 — ESC to abort an image pull, falling back to the local image
  • PRO-325 — smart refresh: pull_policy config + --pull flag
  • PRO-326 — daily non-blocking "newer image available" notice

Tests

  • Unit: internal/config Image() resolution cases (with/without tag, registry port, digest, default).
  • Integration: TestStartWithCustomImageFailsClearlyWhenUnavailable — a configured custom image is honored and fails clearly when it can be neither pulled nor found locally.

Known limitations

  • Running-container discovery (FindRunningByImage) still matches only the default localstack/* repos, so a container started from a custom image is invisible to the image-based scans used for port-conflict / cross-type detection and stop/status reuse. The common re-run path is unaffected (it matches by container name). Extending discovery to custom images is tracked as follow-up.

Refs DEVX-703

@gtsiolis gtsiolis force-pushed the devx-703-support-enterprise-environments-that-cannot-pull-from-ac7a branch from bda6687 to c110e5c Compare June 22, 2026 07:42
@gtsiolis gtsiolis changed the title feat: support offline mode and custom images for enterprise setups feat: degrade gracefully offline and support custom images Jun 22, 2026
@gtsiolis gtsiolis added semver: patch docs: needed Pull request requires documentation updates labels Jun 22, 2026
@gtsiolis gtsiolis self-assigned this Jun 22, 2026
@gtsiolis gtsiolis marked this pull request as ready for review June 22, 2026 11:24
@gtsiolis gtsiolis force-pushed the devx-703-support-enterprise-environments-that-cannot-pull-from-ac7a branch 2 times, most recently from 19ff009 to 49bf731 Compare June 22, 2026 11:39
@carole-lavillonniere

Copy link
Copy Markdown
Collaborator

I would ship these 2 features in 2 PRs to keep them small and easy to review:

  • override of image
  • offline handling

For the latter, we are missing the most important integration tests that make sure the CLI works properly when offline.

Copy link
Copy Markdown
Member Author

Agree, will break in two PRs later. :loading:

@gtsiolis gtsiolis marked this pull request as draft June 22, 2026 12:14
@gtsiolis gtsiolis force-pushed the devx-703-support-enterprise-environments-that-cannot-pull-from-ac7a branch 2 times, most recently from 9d11ab8 to 8e798eb Compare June 23, 2026 13:47
@gtsiolis gtsiolis changed the title feat: degrade gracefully offline and support custom images feat: support custom container images via config Jun 23, 2026
@gtsiolis gtsiolis force-pushed the devx-703-support-enterprise-environments-that-cannot-pull-from-ac7a branch from 8e798eb to 37dd169 Compare June 23, 2026 19:23
Each [[containers]] block may set an optional `image` to override the
default Docker Hub image, e.g. an internal registry mirror or a locally
loaded offline image. ContainerConfig.Image() returns `image` as-is when
it already carries a tag, otherwise it appends `tag` (or "latest"); the
default localstack/<product>:<tag> is used when `image` is unset.

Refs DEVX-703
@gtsiolis gtsiolis force-pushed the devx-703-support-enterprise-environments-that-cannot-pull-from-ac7a branch from 37dd169 to fd896c8 Compare June 24, 2026 19:06
@gtsiolis gtsiolis marked this pull request as ready for review June 24, 2026 19:11
@gtsiolis gtsiolis requested a review from a team as a code owner June 24, 2026 19:11
@gtsiolis

Copy link
Copy Markdown
Member Author

Could you take another look, @carole-lavillonniere? 🍸

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

Labels

docs: needed Pull request requires documentation updates semver: patch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants