Skip to content

Add --image flag to run a custom emulator image for one start - #525

Merged
anisaoshafi merged 5 commits into
mainfrom
devx-1121-add-an-image-flag-to-lstk
Sep 30, 2026
Merged

anisaoshafi merged 5 commits into
mainfrom
devx-1121-add-an-image-flag-to-lstk

Conversation

@anisaoshafi

@anisaoshafi anisaoshafi commented Sep 29, 2026 •

Copy link
Copy Markdown
Collaborator

What

Adds an --image flag, so you can run any image without editing config.toml:
lstk -t snowflake --image localstack/snowflake-next

How it works

  • --image applies to one run only. lstk never saves it to config.
  • -t works as before.
  • stop, status, and logs still find the emulator. lstk finds its container by name, not by image.
  • restart keeps the image. lstk puts a label on a container started with --image, and a plain restart reuses that image. If the image came from config, restart reads the config again, so config edits still apply.
  • lstk rejects invalid image names, and a known image for the wrong emulator (e.g. -t aws --image localstack/snowflake). Neither changes the config.
  • If the emulator is already running another image, lstk warns that --image was not applied.

Testing

  • New integration tests cover the flag, the checks, and restart.
  • Ran it by hand with the real localstack/snowflake-next image: start, status, restart, stop, and the interactive mode.
scenario result
start success imagen
status imagen
known image of the wrong type imagen
unknown image imagen

@anisaoshafi anisaoshafi added semver: minor docs: needed Pull request requires documentation updates labels Sep 29, 2026
@anisaoshafi
anisaoshafi force-pushed the devx-1121-add-an-image-flag-to-lstk branch from 51d0122 to 7404d1a Compare September 29, 2026 16:58
@anisaoshafi
anisaoshafi marked this pull request as ready for review September 29, 2026 17:32
@anisaoshafi
anisaoshafi requested review from a team and peter-smith-phd as code owners September 29, 2026 17:32
@anisaoshafi
anisaoshafi force-pushed the devx-1121-add-an-image-flag-to-lstk branch from 8bc3fa6 to c9f12cb Compare September 30, 2026 16:38
@anisaoshafi
anisaoshafi merged commit d836e2c into main Sep 30, 2026
33 of 35 checks passed
@anisaoshafi
anisaoshafi deleted the devx-1121-add-an-image-flag-to-lstk branch September 30, 2026 17:50
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: minor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant