1414ENV_WIREMOCK_API_TOKEN = "WIREMOCK_API_TOKEN"
1515# Host path to directory containing .wiremock/ (required for runner mode)
1616ENV_WIREMOCK_CONFIG_DIR = "WIREMOCK_CONFIG_DIR"
17+ # Override the OSS image (default: wiremock/wiremock); accepts full ref with optional tag
18+ ENV_WIREMOCK_IMAGE = "WIREMOCK_IMAGE"
19+ # Override the runner image (default: wiremock/wiremock-runner); accepts full ref with optional tag
20+ ENV_WIREMOCK_IMAGE_RUNNER = "WIREMOCK_IMAGE_RUNNER"
1721
1822SERVICE_PORT = 8080 # Mock API port
1923ADMIN_PORT = 9999 # Admin interface port (runner mode)
@@ -29,7 +33,7 @@ class WireMockExtension(ProxiedDockerContainerExtension):
2933
3034 def __init__ (self ):
3135 env_vars = {}
32- image_name = self .DOCKER_IMAGE
36+ image_name = os . getenv ( ENV_WIREMOCK_IMAGE ) or self .DOCKER_IMAGE
3337 volumes = None
3438 container_ports = [SERVICE_PORT ]
3539 health_check_path = "/__admin/health"
@@ -41,7 +45,7 @@ def __init__(self):
4145 env_vars ["WMC_ADMIN_PORT" ] = str (ADMIN_PORT )
4246 env_vars ["WMC_API_TOKEN" ] = api_token
4347 env_vars ["WMC_RUNNER_ENABLED" ] = "true"
44- image_name = self .DOCKER_IMAGE_RUNNER
48+ image_name = os . getenv ( ENV_WIREMOCK_IMAGE_RUNNER ) or self .DOCKER_IMAGE_RUNNER
4549 container_ports = [SERVICE_PORT , ADMIN_PORT ]
4650 health_check_path = "/__/health"
4751 health_check_retries = 90
0 commit comments