### 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.
get_bucket_from_moto,
    get_header_name,
    get_key_from_moto_bucket,
    get_object_checksum_for_algorithm,
    is_bucket_name_valid,
    is_canned_acl_bucket_valid,
    is_key_expired,
    is_valid_canonical_id,
    validate_kms_key_id,
    verify_checksum,
)
from localstack.services.s3.website_hosting import register_website_hosting_routes
from localstack.utils.aws import arns, aws_stack
from localstack.utils.aws.arns import s3_bucket_name
from localstack.utils.collections import get_safe
from localstack.utils.patch import patch
from localstack.utils.strings import short_uid
from localstack.utils.urls import localstack_host
LOG = logging.getLogger(__name__)
os.environ[
    "MOTO_S3_CUSTOM_ENDPOINTS"
] = "s3.localhost.localstack.cloud:4566,s3.localhost.localstack.cloud"
MOTO_CANONICAL_USER_ID = "75aa57f09aa0c8caeab4f8c24e99d10f8e7faeebf76c078efc7c6caea54ba06a"
S3_MAX_FILE_SIZE_BYTES = 512 * 1024
class MalformedXML(CommonServiceException):
    def __init__(self, message=None):
        if not message:
            message = "The XML you provided was not well-formed or did not validate against our published schema"
        super().__init__("MalformedXML", status_code=400, message=message)
class MalformedACLError(CommonServiceException):