### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current Behavior

this is my docker-config.yml
```

localstack:
    image: localstack/localstack:latest
    restart : always
    environment:
      - AWS_DEFAULT_REGION=eu-central-1
      - SERVICES=neptune,route53,events,stepfunctions,kinesis,cloudtrail,ses,elbv2,es,ec2,secretsmanager,firehose,ecs,ecr,sns,sqs,appsync,edge,cognito,lambda,s3,docdb,apigateway,apigatewayv2,cloudformation,sts,iam,dynamodb:4701,cloudfront
      - START_WEB=0
      - DEBUG=1
      - NODE_TLS_REJECT_UNAUTHORIZED=0
      - DISABLE_EVENTS=true
      - TEST_AWS_ACCOUNT_ID=123456789012
      - LAMBDA_EXECUTOR=docker-reuse
      - HOSTNAME_EXTERNAL=localstack
      - LAMBDA_DOCKER_NETWORK=localstack_default
      - LAMBDA_REMOTE_DOCKER=true
      - LAMBDA_REMOVE_CONTAINERS=false
      - DATA_DIR=/tmp/localstack/data
      - HOST_TMP_FOLDER=/tmp/localstack
      - LOCALSTACK_API_KEY=xxxxxxxxxx
      - DOCKER_HOST=unix:///var/run/docker.sock
      - DYNAMODB_PORT_EXTERNAL=4701
      - HOSTNAME_EXTERNAL=localstack
      - LAMBDA_DOCKER_DNS=8.8.8.8
 ```

the  lambda container cannot comunicate with external service, but only with service inside docker network named localstack_default




### Expected Behavior

lambda container can comunicate with external service

### How are you starting LocalStack?

Custom (please describe below)

### Steps To Reproduce

executing this py script inside lambda container 

```
import requests
print (requests.get('https://ifconfig.co/json’).text)

```

i got " [Errno -3] Temporary failure in name resolution'"

work replacing the idfconfig.co with ip addess



### Environment

```markdown
- OS: debian 11
- LocalStack: 0.12.17 or latest
```


### Anything else?

the /etc/hosts file  into the lambda container started from localstack:0.12.17
```

127.0.0.1	localhost
::1	localhost ip6-localhost ip6-loopback
fe00::0	ip6-localnet
ff00::0	ip6-mcastprefix
ff02::1	ip6-allnodes
ff02::2	ip6-allrouters
172.18.0.4	77c41d53db2b
172.17.0.1 localhost.localstack.cloud

```

the /etc/hosts file  into the lambda container started from localstack:0.12.16

```
127.0.0.1	localhost
::1	localhost ip6-localhost ip6-loopback
fe00::0	ip6-localnet
ff00::0	ip6-mcastprefix
ff02::1	ip6-allnodes
ff02::2	ip6-allrouters
172.18.0.3	8e545993dcf9
172.18.0.8 localhost.localstack.cloud
```



bind_address = f"{self.bind_host}:" if self.bind_host else ""
        def entry(k, v):
            protocol = "/%s" % k[2] if k[2] != "tcp" else ""
            if k[0] == k[1] and v[0] == v[1]:
                return "-p %s%s:%s%s" % (bind_address, k[0], v[0], protocol)
            return "-p %s%s-%s:%s-%s%s" % (bind_address, k[0], k[1], v[0], v[1], protocol)
        return " ".join([entry(k, v) for k, v in self.mappings.items()])
    def to_list(self) -> List[str]:  
        bind_address = f"{self.bind_host}:" if self.bind_host else ""
        def entry(k, v):
            protocol = "/%s" % k[2] if k[2] != "tcp" else ""
            if k[0] == k[1] and v[0] == v[1]:
                return ["-p", f"{bind_address}{k[0]}:{v[0]}{protocol}"]
            return ["-p", f"{bind_address}{k[0]}-{k[1]}:{v[0]}-{v[1]}{protocol}"]
        return [item for k, v in self.mappings.items() for item in entry(k, v)]
    def to_dict(self) -> Dict[str, Union[Tuple[str, int], int]]:
        bind_address = self.bind_host or ""
        def entry(k, v):
            protocol = "/%s" % k[2]
            return [
                (
                    f"{container_port}{protocol}",
                    (bind_address, host_port) if bind_address else host_port,
                )
                for container_port, host_port in zip(range(v[0], v[1] + 1), range(k[0], k[1] + 1))
            ]
        items = [item for k, v in self.mappings.items() for item in entry(k, v)]
        return dict(items)
    def contains(self, port):