### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current Behavior

No matter what I do I cannot seem to connect to LocalStack v2.x inside of a GitLab container.

Locally, this works `http://s3.localhost.localstack.cloud:4566` using the same container without having to set path style.

In GitLab,

This works using v1.4 (for whatever reason this only worked when I set the path style)

```yaml
  services:
    - name: localstack/localstack:1.4
      alias: localstack
  variables:
    AWS_ACCESS_KEY_ID: test
    AWS_DEFAULT_REGION: us-east-1
    AWS_SECRET_ACCESS_KEY: test
    DEBUG: 1
    FORCE_NONINTERACTIVE: "true"
    LOCALSTACK_HOST: localstack
    SERVICES: s3
    S3_ENDPOINT_OVERRIDE: http://localstack:4566
    S3_PATH_STYLE_ACCESS: "true"
```

Now, it either cannot context or gives a "length" issue when trying to create a bucket.

```yaml
  services:
    - name: localstack/localstack #:1.4
      alias: localstack
  variables:
    AWS_ACCESS_KEY_ID: test
    AWS_DEFAULT_REGION: us-east-1
    AWS_SECRET_ACCESS_KEY: test
    DEBUG: 1
    FORCE_NONINTERACTIVE: "true"
    LOCALSTACK_HOST: localstack
    SERVICES: s3
    SKIP_E2E_TESTS: "false"
    S3_ENDPOINT_OVERRIDE: http://s3.localstack.localstack.cloud:4566
    S3_PATH_STYLE_ACCESS: "false"
```


### Expected Behavior

Access to S3 using v2 works the same, or with minor changes, since it worked with v1.4.

### How are you starting LocalStack?

Custom (please describe below)

### Steps To Reproduce

Running localstack as a GitLab service inside of a runner that does not have increased docker privileges.

### Environment

```markdown
- LocalStack: v2.0
```


### Anything else?

I've tried everything I can think of, assumingit is the URL endpoint (we had to make that change locally earlier), but no luck.
def __init__(self, message=None):
        super().__init__("MalformedACLError", status_code=400, message=message)
class InvalidRequest(CommonServiceException):
    def __init__(self, message=None):
        super().__init__("InvalidRequest", status_code=400, message=message)
class UnexpectedContent(CommonServiceException):
    def __init__(self, message=None):
        super().__init__("UnexpectedContent", status_code=400, message=message)
def get_full_default_bucket_location(bucket_name):
    if config.HOSTNAME_EXTERNAL != config.LOCALHOST:
        host_definition = localstack_host(
            use_hostname_external=True, custom_port=config.get_edge_port_http()
        )
        return f"{config.get_protocol()}://{host_definition.host_and_port()}/{bucket_name}/"
    else:
        host_definition = localstack_host(use_localhost_cloud=True)
        return f"{config.get_protocol()}://{bucket_name}.s3.{host_definition.host_and_port()}/"
class S3Provider(S3Api, ServiceLifecycleHook):
    @staticmethod
    def get_store() -> S3Store:
        return s3_stores[get_aws_account_id()][aws_stack.get_region()]
    def _clear_bucket_from_store(self, bucket: BucketName):
        store = self.get_store()
        store.bucket_lifecycle_configuration.pop(bucket, None)
        store.bucket_versioning_status.pop(bucket, None)
        store.bucket_cors.pop(bucket, None)
        store.bucket_notification_configs.pop(bucket, None)
        store.bucket_replication.pop(bucket, None)
        store.bucket_website_configuration.pop(bucket, None)
    def on_after_init(self):