From 179a9fda54d21454248663d8411affeb2a403186 Mon Sep 17 00:00:00 2001 From: Simon Walker Date: Thu, 28 Sep 2023 16:48:05 +0100 Subject: [PATCH] Remove previous wildcard DNS access guide --- .../endpoint-url/_index.md | 70 +------------------ 1 file changed, 2 insertions(+), 68 deletions(-) diff --git a/content/en/references/network-troubleshooting/endpoint-url/_index.md b/content/en/references/network-troubleshooting/endpoint-url/_index.md index 73a6c22f6a..079b70b3cb 100644 --- a/content/en/references/network-troubleshooting/endpoint-url/_index.md +++ b/content/en/references/network-troubleshooting/endpoint-url/_index.md @@ -204,74 +204,8 @@ networks: ### Wildcard DNS access -{{}} -The Wildcard DNS access feature is part of [LocalStack's Pro/Team offering](https://localstack.cloud/pricing) and requires an API key to be configured. -{{}} - -Certain resources created by LocalStack can be accessed using virtual host addressing. For example, an S3 bucket can be accessed at the following address format: `.s3..localhost.localstack.cloud`. - -By default, the LocalStack container cannot be reached from containers running in your Docker network at the above address. This is because any subdomains of `localhost.localstack.cloud` is resolved to `127.0.0.1` within the Docker network. - -If Docker supported wildcard DNS configuration with `--network-alias` (Docker CLI) or `aliases:` (`docker-compose`), this could be solved with Docker configuration alone. - -To map more complex domain names to the LocalStack container within the Docker network, the LocalStack container can be utilized as a DNS server. However, this approach requires additional configuration steps. - -Specifically, the LocalStack container must have a static IP address within the network. To set up the LocalStack container as a DNS server, a static IP address must be assigned within the Docker network. - -Here is an example of how you can set it up: - -{{}} -{{}} -# Create the network -docker network create my-network --subnet - -# Start LocalStack -docker run --rm -it \ - --network my-network \ - --ip 10.0.2.20 \ - -e DNS_RESOLVE_IP=10.0.2.20 \ - \ - localstack/localstack-pro - -# Start your application container -docker run --rm -it \ - --dns 10.0.2.20 \ - --network my-network \ - -# Your code can now access LocalStack at .localhost.localstack.cloud -{{}} -{{}} -services: - localstack: - # ... other configuration here - environment: - - DNS_RESOLVE_IP=10.0.2.20 - networks: - ls: - ipv4_address: 10.0.2.20 - - application: - # ... other configuration here - dns: - - 10.0.2.20 - networks: - ls: - -networks: - ls: - name: ls - ipam: - config: - - subnet: 10.0.2.0/24 -{{}} -{{}} - -To access LocalStack resources from the *application* container, you can make requests to the following address format: `.s3..localhost.localstack.cloud:4566/`. This will ensure that the requests reach the LocalStack container. - -{{}} -For optimal configuration, we recommend using a private IP address range, such as 10.0.0.0/8, for your containers. This helps avoid conflicts with IP addresses assigned by Docker. -Additionally, it's advisable to avoid using `X.X.X.1` as an IP address, as it is commonly reserved for the host within that subnet. -{{}} +LocalStack newer than version 2.3.0 supports wildcard DNS access by default. +Please update your LocalStack container and see the [instructions]({{< ref "#from-your-container" >}}).