setup-localstack icon indicating copy to clipboard operation
setup-localstack copied to clipboard

Allow specifying a custom Docker image name and registry

Open tidharm opened this issue 7 months ago • 0 comments

Description

This pull request enhances the setup-localstack action by introducing a new input, image-name. This allows users to specify a full Docker image name, including a custom registry (e.g., my.registry.com/localstack/localstack:latest), rather than being limited to images hosted on Docker Hub, for when organizational policies restrict where images are allowed to be pulled from.

The action has been updated to prioritize the image-name input. If it is provided, it will be used directly to pull the LocalStack image (populating the $IMAGE_NAME environment variable). If it is not provided, the action will fall back to the existing behavior of constructing the image name using the image-tag input.

This change provides greater flexibility for users who manage their own Docker registries or use mirrors.

Changes

  • Add the image-name input in action.yml and pass it to the startup sub-action.
  • Update startup/action.yml to accept the image-name input and modify the startup logic to prioritize it over image-tag (directly populating $IMAGE_NAME).
  • Update the documentation in README.md to include the new image-name input.

How to use

To use a custom image, simply add the image-name input to your workflow:

- name: Start LocalStack from a custom registry
  uses: LocalStack/[email protected]
  with:
    image-name: 'my.registry.com/localstack/localstack-pro:latest'
  env:
    LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }}

tidharm avatar Jul 13 '25 08:07 tidharm