@Override
    protected void configure() {
        super.configure();

        if (this.servicesEnvVarRequired) {
            Preconditions.check("services list must not be empty", !services.isEmpty());
        }

        if (!services.isEmpty()) {
            withEnv("SERVICES", services.stream().map(EnabledService::getName).collect(Collectors.joining(",")));
            if (this.servicesEnvVarRequired) {
                withEnv("EAGER_SERVICE_LOADING", "1");
            }
        }

        if (this.isVersion2) {
            resolveHostname(LOCALSTACK_HOST_ENV_VAR);
        } else {
            resolveHostname(HOSTNAME_EXTERNAL_ENV_VAR);
        }

        exposePorts();
    }
@param dockerImageName    image name to use for Localstack
@param useLegacyMode      if true, each AWS service is exposed on a different port
@deprecated use {@link #LocalStackContainer(DockerImageName)} instead
modules/localstack/src/main/java/org/testcontainers/containers/localstack/LocalStackContainer.java