I'm having trouble following the Docker documentation for building a containerized application. When I run the command `docker compose watch`, I encounter an error that says the system can't resolve the hostname for one of the Docker images. Here's the output I get:
```
C:UsersDELLgetting-started-todo-app>docker compose watch
[+] Running 0/3
- proxy Pulling 6.8s
- phpmyadmin Pulling 6.8s
- mysql Pulling 6.8s
failed to copy: httpReadSeeker: failed open: failed to do request: Get "https://docker-images-prod.6aa30f8b08e16409b46e0173d6de2f56.r2.cloudflarestorage.com/data?X-Amz-Algorithm=&X-Amz-Credential=&X-Amz-Date=&X-Amz-Expires=&X-Amz-SignedHeaders=&X-Amz-Signature=": dialing docker-images-prod.6aa30f8b08e16409b46e0173d6de2f56.r2.cloudflarestorage.com:443 container via direct connection because static system has no HTTPS proxy: connecting to docker-images-prod.6aa30f8b08e16409b46e0173d6de2f56.r2.cloudflarestorage.com:443: dial tcp: lookup docker-images-prod.6aa30f8b08e16409b46e0173d6de2f56.r2.cloudflarestorage.com: no such host
```
I did some additional checks using `nslookup` and `ping`, but they failed to find the host. Here's the output I got:
```
C:UsersDELLgetting-started-todo-app>nslookup docker-images-prod.6aa30f8b08e16409b46e0173d6de2f56.r2.cloudflarestorage.com
Server: UnKnown
Address:
*** UnKnown can't find docker-images-prod.6aa30f8b08e16409b46e0173d6de2f56.r2.cloudflarestorage.com: Query refused
```
And:
```
C:UsersDELLgetting-started-todo-app>ping docker-images-prod.6aa30f8b08e16409b46e0173d6de2f56.r2.cloudflarestorage.com
Ping request could not find host docker-images-prod.6aa30f8b08e16409b46e0173d6de2f56.r2.cloudflarestorage.com. Please check the name and try again.
```
Additionally, I tried building the image directly using `docker build -t getting-started-todo-app .`, which threw a different error regarding source metadata:
```
ERROR: failed to build: failed to solve: node:22: failed to resolve source metadata for docker.io/library/node:22
```
I've read that changing the DNS to a secure public one, like Google's, might help, but I'm unsure if that's the route I should take or if there's another issue at play since I can successfully run other Docker commands.
2 Answers
It sounds like your DNS settings might need to be adjusted. If you haven't already, try switching to a public DNS like Google's (8.8.8.8). This can often resolve issues related to hostnames not being found. Just keep in mind you might need to restart your Docker service after changing the DNS for it to take effect.
You might also want to check if your work network has any restrictions or firewalls that could block Docker from accessing the internet. If it's the case, talk to your IT department. They might be able to help with the DNS issues or suggest a workaround.

Related Questions
How To: Running Codex CLI on Windows with Azure OpenAI
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically