Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions localstack_utils/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ def create_localstack_container(
pull_new_image: bool = False,
image_name: str = LOCALSTACK_IMAGE_NAME,
image_tag: str = LATEST_TAG,
container_name: str = DEFAULT_CONTAINER_ID,
gateway_listen: str = "0.0.0.0:4566",
auto_remove: bool = False,
environment_variables: dict | None = None,
Expand All @@ -52,6 +53,7 @@ def create_localstack_container(

return DOCKER_CLIENT.containers.run(
image_name,
name=container_name,
ports=bind_ports,
environment=environment_variables,
auto_remove=auto_remove,
Expand Down
5 changes: 5 additions & 0 deletions localstack_utils/localstack.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ def startup(self, docker_configuration):
pull_new_image=docker_configuration.pull_new_image,
image_name=docker_configuration.image_name,
image_tag=docker_configuration.image_tag,
container_name=docker_configuration.container_name,
gateway_listen=docker_configuration.gateway_listen,
auto_remove=docker_configuration.auto_remove_container,
environment_variables=docker_configuration.environment_variables,
Expand Down Expand Up @@ -71,6 +72,7 @@ def setup_logger(self):
def startup_localstack(
image_name="",
tag="",
container_name="",
pro=False,
ports=None,
env_variables=None,
Expand All @@ -89,6 +91,9 @@ def startup_localstack(
if tag:
config.image_tag = tag

if container_name:
config.container_name = container_name

if ports:
config.port_mappings = ports

Expand Down
1 change: 1 addition & 0 deletions localstack_utils/localstack_docker_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ class LocalstackDockerConfiguration:
randomize_ports = False
image_name = None
image_tag = None
container_name = None
platform = None

gateway_listen = "0.0.0.0:4566"
Expand Down
Loading