feat: support custom container images via config#325
Open
gtsiolis wants to merge 1 commit into
Open
Conversation
bda6687 to
c110e5c
Compare
19ff009 to
49bf731
Compare
Collaborator
|
I would ship these 2 features in 2 PRs to keep them small and easy to review:
For the latter, we are missing the most important integration tests that make sure the CLI works properly when offline. |
Member
Author
|
Agree, will break in two PRs later. :loading: |
9d11ab8 to
8e798eb
Compare
8e798eb to
37dd169
Compare
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
37dd169 to
fd896c8
Compare
Member
Author
|
Could you take another look, @carole-lavillonniere? 🍸 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds an optional per-container
imagefield 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():imageas-is when it already carries a tag,tag(orlatest),localstack/<product>:<tag>whenimageis 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:
pull_policyconfig +--pullflagTests
internal/configImage()resolution cases (with/without tag, registry port, digest, default).TestStartWithCustomImageFailsClearlyWhenUnavailable— a configured custom image is honored and fails clearly when it can be neither pulled nor found locally.Known limitations
FindRunningByImage) still matches only the defaultlocalstack/*repos, so a container started from a customimageis 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